Home
last modified time | relevance | path

Searched refs:bufsiz (Results 1 – 25 of 66) sorted by relevance

123

/freebsd/contrib/libexecinfo/
H A Dbacktrace.c77 rasprintf(char **buf, size_t *bufsiz, size_t offs, const char *fmt, ...) in rasprintf() argument
83 if (*buf && offs < *bufsiz) { in rasprintf()
88 len = vsnprintf(*buf + offs, *bufsiz - offs, fmt, ap); in rasprintf()
91 if (len < 0 || (size_t)len + 1 < *bufsiz - offs) in rasprintf()
93 nbufsiz = MAX(*bufsiz + 512, (size_t)len + 1); in rasprintf()
95 nbufsiz = MAX(offs, *bufsiz) + 512; in rasprintf()
101 *bufsiz = nbufsiz; in rasprintf()
114 format_string(char **buf, size_t *bufsiz, size_t offs, const char *fmt, in format_string() argument
126 len = rasprintf(buf, bufsiz, o, "%p", addr); in format_string()
129 len = rasprintf(buf, bufsiz, o, "%s", dli->dli_sname); in format_string()
[all …]
/freebsd/contrib/libarchive/unzip/
H A Dla_getline.c30 la_getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp) in la_getdelim() argument
35 if (*buf == NULL || *bufsiz == 0) { in la_getdelim()
36 *bufsiz = BUFSIZ; in la_getdelim()
37 if ((*buf = malloc(*bufsiz)) == NULL) in la_getdelim()
41 for (ptr = *buf, eptr = *buf + *bufsiz;;) { in la_getdelim()
60 size_t nbufsiz = *bufsiz * 2; in la_getdelim()
65 *bufsiz = nbufsiz; in la_getdelim()
73 getline(char **buf, size_t *bufsiz, FILE *fp) in getline() argument
75 return la_getdelim(buf, bufsiz, '\n', fp); in getline()
/freebsd/contrib/blocklist/port/
H A Dfgetln.c50 static size_t bufsiz = 0; in fgetln() local
55 bufsiz = BUFSIZ; in fgetln()
56 if ((buf = malloc(bufsiz)) == NULL) in fgetln()
60 if (fgets(buf, bufsiz, fp) == NULL) in fgetln()
65 size_t nbufsiz = bufsiz + BUFSIZ; in fgetln()
77 if (fgets(&buf[bufsiz], BUFSIZ, fp) == NULL) { in fgetln()
78 buf[bufsiz] = '\0'; in fgetln()
83 *len = bufsiz; in fgetln()
84 bufsiz = nbufsiz; in fgetln()
/freebsd/contrib/file/src/
H A Dgetline.c41 getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp) in getdelim() argument
46 if (*buf == NULL || *bufsiz == 0) { in getdelim()
47 *bufsiz = BUFSIZ; in getdelim()
48 if ((*buf = malloc(*bufsiz)) == NULL) in getdelim()
52 for (ptr = *buf, eptr = *buf + *bufsiz;;) { in getdelim()
71 size_t nbufsiz = *bufsiz * 2; in getdelim()
76 *bufsiz = nbufsiz; in getdelim()
84 getline(char **buf, size_t *bufsiz, FILE *fp) in getline() argument
86 return getdelim(buf, bufsiz, '\n', fp); in getline()
/freebsd/crypto/openssh/openbsd-compat/
H A Dbsd-getline.c50 getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp) in getdelim() argument
55 if (*buf == NULL || *bufsiz == 0) { in getdelim()
58 *bufsiz = BUFSIZ; in getdelim()
61 for (ptr = *buf, eptr = *buf + *bufsiz;;) { in getdelim()
80 size_t nbufsiz = *bufsiz * 2; in getdelim()
85 *bufsiz = nbufsiz; in getdelim()
93 getline(char **buf, size_t *bufsiz, FILE *fp) in getline() argument
95 return getdelim(buf, bufsiz, '\n', fp); in getline()
H A Dreadpassphrase.c54 readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) in readpassphrase() argument
64 if (bufsiz == 0) { in readpassphrase()
130 end = buf + bufsiz - 1; in readpassphrase()
/freebsd/contrib/libfido2/openbsd-compat/
H A Dbsd-getline.c52 getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp) in getdelim() argument
57 if (*buf == NULL || *bufsiz == 0) { in getdelim()
60 *bufsiz = BUFSIZ; in getdelim()
63 for (ptr = *buf, eptr = *buf + *bufsiz;;) { in getdelim()
82 size_t nbufsiz = *bufsiz * 2; in getdelim()
87 *bufsiz = nbufsiz; in getdelim()
95 getline(char **buf, size_t *bufsiz, FILE *fp) in getline() argument
97 return getdelim(buf, bufsiz, '\n', fp); in getline()
H A Dreadpassphrase.c60 readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) in readpassphrase() argument
70 if (bufsiz == 0) { in readpassphrase()
134 end = buf + bufsiz - 1; in readpassphrase()
/freebsd/contrib/libxo/xo/
H A Dxo.c95 formatter (xo_handle_t *xop, char *buf, xo_ssize_t bufsiz, in formatter() argument
146 rc = snprintf(buf, bufsiz, fmt, w1, w2, value); in formatter()
148 rc = snprintf(buf, bufsiz, fmt, w1, value); in formatter()
150 rc = snprintf(buf, bufsiz, fmt, value); in formatter()
155 rc = snprintf(buf, bufsiz, fmt, w1, w2, value); in formatter()
157 rc = snprintf(buf, bufsiz, fmt, w1, value); in formatter()
159 rc = snprintf(buf, bufsiz, fmt, value); in formatter()
164 rc = snprintf(buf, bufsiz, fmt, w1, w2, value); in formatter()
166 rc = snprintf(buf, bufsiz, fmt, w1, value); in formatter()
168 rc = snprintf(buf, bufsiz, fmt, value); in formatter()
[all …]
/freebsd/crypto/openssl/apps/lib/
H A Dapps_ui.c164 int password_callback(char *buf, int bufsiz, int verify, PW_CB_DATA *cb_data) in password_callback() argument
193 PW_MIN_LENGTH, bufsiz - 1); in password_callback()
196 buff = ui_malloc(bufsiz, "password buffer"); in password_callback()
198 PW_MIN_LENGTH, bufsiz - 1, buf); in password_callback()
205 OPENSSL_clear_free(buff, (unsigned int)bufsiz); in password_callback()
212 OPENSSL_cleanse(buf, (unsigned int)bufsiz); in password_callback()
217 OPENSSL_cleanse(buf, (unsigned int)bufsiz); in password_callback()
/freebsd/contrib/ntp/libntp/
H A Dmsyslog.c102 size_t bufsiz in errno_to_str() argument
110 pstatic = strerror_r(err, buf, bufsiz); in errno_to_str()
115 snprintf(buf, bufsiz, "%s(%d): errno %d", in errno_to_str()
123 else if (pstatic != buf && pstatic > (char *)bufsiz) in errno_to_str()
124 strlcpy(buf, pstatic, bufsiz); in errno_to_str()
128 rc = strerror_r(err, buf, bufsiz); in errno_to_str()
130 snprintf(buf, bufsiz, "strerror_r(%d): errno %d", in errno_to_str()
228 size_t bufsiz, in mvsnprintf() argument
254 return vsnprintf(buf, bufsiz, nfmt, ap); in mvsnprintf()
328 size_t bufsiz, in msnprintf() argument
[all...]
H A Daudio.c228 int bufsiz, /* buffer size */ in audio_init() argument
287 printf("audio_init: <%s> bufsiz %d\n", dname, bufsiz); in audio_init()
297 s_size.play_size = s_size.rec_size = bufsiz; in audio_init()
362 info.record.buffer_size = bufsiz; in audio_init()
/freebsd/sys/cddl/contrib/opensolaris/common/lz4/
H A Dlz4.c78 uint32_t bufsiz; in lz4_compress() local
81 ASSERT(d_len >= sizeof (bufsiz)); in lz4_compress()
83 bufsiz = real_LZ4_compress(s_start, &dest[sizeof (bufsiz)], s_len, in lz4_compress()
84 d_len - sizeof (bufsiz)); in lz4_compress()
87 if (bufsiz == 0) in lz4_compress()
97 *(uint32_t *)(void *)dest = BE_32(bufsiz); in lz4_compress()
99 *(uint32_t *)(void *)dest = htonl(bufsiz); in lz4_compress()
102 return (bufsiz + sizeof (bufsiz)); in lz4_compress()
111 uint32_t bufsiz = BE_IN32(s_start); in lz4_decompress() local
113 uint32_t bufsiz = htonl(*(uint32_t *)s_start); in lz4_decompress() local
[all …]
/freebsd/sys/contrib/openzfs/module/zfs/
H A Dlz4_zfs.c61 uint32_t bufsiz; in zfs_lz4_compress_buf() local
64 ASSERT(d_len >= sizeof (bufsiz)); in zfs_lz4_compress_buf()
66 bufsiz = real_LZ4_compress(s_start, &dest[sizeof (bufsiz)], s_len, in zfs_lz4_compress_buf()
67 d_len - sizeof (bufsiz)); in zfs_lz4_compress_buf()
70 if (bufsiz == 0) in zfs_lz4_compress_buf()
79 *(uint32_t *)dest = BE_32(bufsiz); in zfs_lz4_compress_buf()
81 return (bufsiz + sizeof (bufsiz)); in zfs_lz4_compress_buf()
90 uint32_t bufsiz = BE_IN32(src); in zfs_lz4_decompress_buf() local
93 if (bufsiz + sizeof (bufsiz) > s_len) in zfs_lz4_decompress_buf()
100 return (LZ4_uncompress_unknownOutputSize(&src[sizeof (bufsiz)], in zfs_lz4_decompress_buf()
[all …]
/freebsd/contrib/libarchive/libarchive_fe/
H A Dpassphrase.c83 readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
111 success = ReadFile(hStdin, buf, (DWORD)bufsiz - 1, &rbytes, NULL); in readpassphrase()
166 readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
178 if (bufsiz == 0) { in readpassphrase()
249 end = buf + bufsiz - 1; in readpassphrase()
321 lafe_readpassphrase(const char *prompt, char *buf, size_t bufsiz)
325 p = readpassphrase(prompt, buf, bufsiz, RPP_ECHO_OFF); in lafe_readpassphrase()
84 readpassphrase(const char * prompt,char * buf,size_t bufsiz,int flags) readpassphrase() argument
168 readpassphrase(const char * prompt,char * buf,size_t bufsiz,int flags) readpassphrase() argument
323 lafe_readpassphrase(const char * prompt,char * buf,size_t bufsiz) lafe_readpassphrase() argument
H A Dpassphrase.h29 char *lafe_readpassphrase(const char *prompt, char *buf, size_t bufsiz);
/freebsd/sys/cam/nvme/
H A Dnvme_xpt.c668 if (cdai->provsiz > cdai->bufsiz) in nvme_dev_advinfo()
669 amt = cdai->bufsiz; in nvme_dev_advinfo()
679 if (cdai->provsiz > cdai->bufsiz) in nvme_dev_advinfo()
680 amt = cdai->bufsiz; in nvme_dev_advinfo()
691 if (cdai->bufsiz == 0) in nvme_dev_advinfo()
693 device->physpath = malloc(cdai->bufsiz, M_CAMXPT, M_NOWAIT); in nvme_dev_advinfo()
698 device->physpath_len = cdai->bufsiz; in nvme_dev_advinfo()
699 memcpy(device->physpath, cdai->buf, cdai->bufsiz); in nvme_dev_advinfo()
705 if (cdai->provsiz > cdai->bufsiz) in nvme_dev_advinfo()
706 amt = cdai->bufsiz; in nvme_dev_advinfo()
[all...]
/freebsd/sys/cam/scsi/
H A Dscsi_enc_ses.c1049 cdai.bufsiz = MAXPATHLEN; in ses_setphyspath_callback()
1060 cdai.bufsiz = sbuf_len(args->physpath); in ses_setphyspath_callback()
1110 cdai.bufsiz = CAM_SCSI_DEVID_MAXLEN; in ses_set_physpath()
1111 cdai.buf = devid = malloc(cdai.bufsiz, M_SCSIENC, M_WAITOK|M_ZERO); in ses_set_physpath()
1172 ses_page_cdb(char *cdb, int bufsiz, SesDiagPageCodes pagenum, int dir) in ses_page_cdb() argument
1185 cdb[3] = bufsiz >> 8; /* high bits */ in ses_page_cdb()
1186 cdb[4] = bufsiz & 0xff; /* low bits */ in ses_page_cdb()
2261 uint8_t *buf, int bufsiz) in ses_get_elm_addlstatus_fc() argument
2489 uint8_t *buf, int bufsiz, int eip, int nobj) in ses_get_elm_addlstatus_sas_type0() argument
2519 if (physz > (bufsiz - offset + 4)) { in ses_get_elm_addlstatus_sas_type0()
[all …]
H A Dscsi_xpt.c2518 if (cdai->provsiz > cdai->bufsiz) in scsi_dev_advinfo()
2519 amt = cdai->bufsiz; in scsi_dev_advinfo()
2529 if (cdai->provsiz > cdai->bufsiz) in scsi_dev_advinfo()
2530 amt = cdai->bufsiz; in scsi_dev_advinfo()
2541 if (cdai->bufsiz == 0) in scsi_dev_advinfo()
2543 device->physpath = malloc(cdai->bufsiz, M_CAMXPT, M_NOWAIT); in scsi_dev_advinfo()
2548 device->physpath_len = cdai->bufsiz; in scsi_dev_advinfo()
2549 memcpy(device->physpath, cdai->buf, cdai->bufsiz); in scsi_dev_advinfo()
2555 if (cdai->provsiz > cdai->bufsiz) in scsi_dev_advinfo()
2556 amt = cdai->bufsiz; in scsi_dev_advinfo()
[all …]
/freebsd/sys/riscv/sifive/
H A Dsifive_spi.c144 sfspi_tx(struct sfspi_softc *sc, uint8_t *buf, uint32_t bufsiz) in sfspi_tx() argument
151 end = buf + bufsiz; in sfspi_tx()
162 sfspi_rx(struct sfspi_softc *sc, uint8_t *buf, uint32_t bufsiz) in sfspi_rx() argument
168 KASSERT(bufsiz <= SFSPI_FIFO_DEPTH, in sfspi_rx()
172 end = buf + bufsiz; in sfspi_rx()
/freebsd/lib/libc/gen/
H A Dreadpassphrase.c43 readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) in readpassphrase() argument
53 if (bufsiz == 0) { in readpassphrase()
125 end = buf + bufsiz - 1; in readpassphrase()
/freebsd/usr.sbin/inetd/
H A Dbuiltins.c361 size_t size, bufsiz; in ident_stream() local
472 bufsiz = sizeof(buf) - 1; in ident_stream()
474 while (bufsiz > 0) { in ident_stream()
489 if ((size_t)onreadlen > bufsiz) in ident_stream()
490 onreadlen = bufsiz; in ident_stream()
496 bufsiz -= ssize; in ident_stream()
/freebsd/tests/sys/ses/
H A Dnondestructive.c423 stri.bufsiz = sizeof(encid); in do_getencid()
472 stri.bufsiz = sizeof(encname); in do_getencname()
621 str_in.bufsiz = 65535; in do_getstring()
625 ATF_CHECK_EQ(sg_ses_count, (ssize_t)str_in.bufsiz); in do_getstring()
626 ATF_CHECK_EQ(0, memcmp(sg_ses_buf, ses_buf, str_in.bufsiz)); in do_getstring()
/freebsd/contrib/libfido2/src/
H A Dnfc.c239 const size_t bufsiz = count; in rx_msg() local
258 if (bufsiz - count > INT_MAX) { in rx_msg()
263 return (int)(bufsiz - count); in rx_msg()
/freebsd/share/examples/ses/srcs/
H A Dgetencstat.c83 stri.bufsiz = sizeof(str); in main()
87 stri.bufsiz = sizeof(str); in main()

123