| /netbsd-src/lib/libutil/ |
| H A D | getdiskrawname.c | 44 resolve_link(char *buf, size_t bufsiz, const char *name) in resolve_link() argument 50 dlen = readlink(name, buf, bufsiz - 1); in resolve_link() 60 if (nlen + 1 > bufsiz) in resolve_link() 62 if (nlen + dlen + 1 > bufsiz) in resolve_link() 84 calc_zvol_name(char *buf, size_t bufsiz, const char *name, const char *raw) in calc_zvol_name() argument 106 snprintf(buf, bufsiz, "/dev/zvol/%sdsk", raw); in calc_zvol_name() 108 strlcat(buf, "/", bufsiz); in calc_zvol_name() 109 strlcat(buf, names[j], bufsiz); in calc_zvol_name() 115 calc_name(char *buf, size_t bufsiz, const char *name, const char *raw) in calc_name() argument 120 return calc_zvol_name(buf, bufsiz, name, raw); in calc_name() [all …]
|
| H A D | getfsspecname.c | 52 getfsspecname(char *buf, size_t bufsiz, const char *name) in getfsspecname() argument 73 strlcpy(buf, "/dev/", bufsiz); in getfsspecname() 74 len = bufsiz - 5; in getfsspecname() 77 strlcpy(buf, "sysctl kern.root_device failed", bufsiz); in getfsspecname() 80 strlcat(buf, name + 5, bufsiz); in getfsspecname() 103 strlcpy(buf, name, bufsiz); in getfsspecname() 114 strlcpy(buf, "malloc failed", bufsiz); in getfsspecname() 122 strlcpy(buf, "sysctl hw.disknames failed", bufsiz); in getfsspecname() 129 strlcpy(buf, "malloc failed", bufsiz); in getfsspecname() 134 strlcpy(buf, "sysctl hw.disknames failed", bufsiz); in getfsspecname() [all …]
|
| H A D | strpct.c | 53 strspct(char *buf, size_t bufsiz, intmax_t numerator, intmax_t denominator, in strspct() argument 58 switch (bufsiz) { in strspct() 80 (void)strpct(buf + sign, bufsiz - sign, (uintmax_t)numerator, in strspct() 88 strpct(char *buf, size_t bufsiz, uintmax_t numerator, uintmax_t denominator, in strpct() argument 117 (void)snprintf(buf, bufsiz, "%ju", result); in strpct() 121 (void)snprintf(buf, bufsiz, "%ju%s%0*ju", in strpct()
|
| /netbsd-src/lib/libexecinfo/ |
| H A D | backtrace.c | 97 rasprintf(char **buf, size_t *bufsiz, size_t offs, const char *fmt, ...) in rasprintf() 103 if (*buf && offs < *bufsiz) { in rasprintf() 108 len = vsnprintf(*buf + offs, *bufsiz - offs, fmt, ap); 111 if (len < 0 || (size_t)len + 1 < *bufsiz - offs) 113 nbufsiz = MAX(*bufsiz + 512, (size_t)len + 1); 115 nbufsiz = MAX(offs, *bufsiz) + 512; in format_string() argument 121 *bufsiz = nbufsiz; in format_string() 134 format_string(char **buf, size_t *bufsiz, size_t offs, const char *fmt, in format_string() 147 len = rasprintf(buf, bufsiz, o, "%p", addr); in format_string() 150 len = rasprintf(buf, bufsiz, in format_string() 78 rasprintf(char ** buf,size_t * bufsiz,size_t offs,const char * fmt,...) rasprintf() argument 158 format_address(symtab_t * st,char ** buf,size_t * bufsiz,size_t offs,const char * fmt,const void * addr) format_address() argument [all...] |
| /netbsd-src/external/bsd/blocklist/port/ |
| H A D | fgetln.c | 50 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()
|
| /netbsd-src/tools/compat/ |
| H A D | getline.c | 48 getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp) in getdelim() argument 53 if (*buf == NULL || *bufsiz == 0) { in getdelim() 54 *bufsiz = BUFSIZ; in getdelim() 55 if ((*buf = malloc(*bufsiz)) == NULL) in getdelim() 59 for (ptr = *buf, eptr = *buf + *bufsiz;;) { in getdelim() 78 size_t nbufsiz = *bufsiz * 2; in getdelim() 83 *bufsiz = nbufsiz; in getdelim() 91 getline(char **buf, size_t *bufsiz, FILE *fp) in getline() argument 93 return getdelim(buf, bufsiz, '\n', fp); in getline()
|
| /netbsd-src/external/bsd/file/dist/src/ |
| H A D | getline.c | 43 getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp) in getdelim() argument 48 if (*buf == NULL || *bufsiz == 0) { in getdelim() 49 *bufsiz = BUFSIZ; in getdelim() 50 if ((*buf = malloc(*bufsiz)) == NULL) in getdelim() 54 for (ptr = *buf, eptr = *buf + *bufsiz;;) { in getdelim() 73 size_t nbufsiz = *bufsiz * 2; in getdelim() 78 *bufsiz = nbufsiz; in getdelim() 86 getline(char **buf, size_t *bufsiz, FILE *fp) in getline() argument 88 return getdelim(buf, bufsiz, '\n', fp); in getline()
|
| /netbsd-src/external/bsd/tmux/dist/compat/ |
| H A D | getline.c | 47 getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp) in getdelim() argument 52 if (*buf == NULL || *bufsiz == 0) { in getdelim() 55 *bufsiz = BUFSIZ; in getdelim() 58 for (ptr = *buf, eptr = *buf + *bufsiz;;) { in getdelim() 77 size_t nbufsiz = *bufsiz * 2; in getdelim() 82 *bufsiz = nbufsiz; in getdelim() 90 getline(char **buf, size_t *bufsiz, FILE *fp) in getline() argument 92 return getdelim(buf, bufsiz, '\n', fp); in getline()
|
| /netbsd-src/external/bsd/libfido2/dist/openbsd-compat/ |
| H A D | bsd-getline.c | 52 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()
|
| /netbsd-src/tests/net/if_vlan/ |
| H A D | bpfopen.c | 213 u_int bufsiz; in bpf_read() local 216 if (ioctl(bpfd, BIOCGBLEN, &bufsiz) != 0) { in bpf_read() 217 bufsiz = BPF_DFLTBUFSIZE; in bpf_read() 219 strerror(errno), bufsiz); in bpf_read() 222 bufsiz = MIN(bufsiz, BPF_DFLTBUFSIZE * 4); in bpf_read() 224 buf = malloc(bufsiz); in bpf_read() 236 log_debug("start reading %s, bufsiz=%u", ifname, bufsiz); in bpf_read() 250 memset(buf, 0, bufsiz); in bpf_read() 251 n = read(pfd[PFD_BPF].fd, buf, bufsiz); in bpf_read()
|
| /netbsd-src/distrib/utils/libhack/ |
| H A D | getpwent.c | 97 getpwent_r(struct passwd *pwres, char *buf, size_t bufsiz, in getpwent_r() argument 104 rval = !pwscan(0, 0, NULL, pwres, buf, bufsiz); in getpwent_r() 121 getpwnam_r(const char *name, struct passwd *pwres, char *buf, size_t bufsiz, in getpwnam_r() argument 128 rval = !pwscan(1, 0, name, pwres, buf, bufsiz); in getpwnam_r() 147 getpwuid_r(uid_t uid, struct passwd *pwres, char *buf, size_t bufsiz, in getpwuid_r() argument 154 rval = !pwscan(1, uid, NULL, pwres, buf, bufsiz); in getpwuid_r() 207 size_t bufsiz) in pwscan() argument 213 if (!fgets(buf, bufsiz, _pw_fp)) { in pwscan()
|
| /netbsd-src/sbin/gpt/ |
| H A D | gpt_uuid.c | 129 gpt_uuid_numeric(char *buf, size_t bufsiz, const struct dce_uuid *u) in gpt_uuid_numeric() 131 return snprintf(buf, bufsiz, in gpt_uuid_numeric() 140 gpt_uuid_symbolic(char *buf, size_t bufsiz, const struct dce_uuid *u) in gpt_uuid_symbolic() 146 return (int)strlcpy(buf, gpt_nv[i].n, bufsiz); in gpt_uuid_symbolic() 151 gpt_uuid_descriptive(char *buf, size_t bufsiz, const struct dce_uuid *u) in gpt_uuid_descriptive() 157 return (int)strlcpy(buf, gpt_nv[i].d, bufsiz); in gpt_uuid_descriptive() 162 gpt_uuid_snprintf(char *buf, size_t bufsiz, const char *fmt, in gpt_uuid_snprintf() 170 if ((r = gpt_uuid_symbolic(buf, bufsiz, &u)) != -1) in gpt_uuid_snprintf() 175 if ((r = gpt_uuid_descriptive(buf, bufsiz, &u)) != -1) in gpt_uuid_snprintf() 178 return gpt_uuid_numeric(buf, bufsiz, in gpt_uuid_snprintf() 128 gpt_uuid_numeric(char * buf,size_t bufsiz,const struct dce_uuid * u) gpt_uuid_numeric() argument 139 gpt_uuid_symbolic(char * buf,size_t bufsiz,const struct dce_uuid * u) gpt_uuid_symbolic() argument 150 gpt_uuid_descriptive(char * buf,size_t bufsiz,const struct dce_uuid * u) gpt_uuid_descriptive() argument 161 gpt_uuid_snprintf(char * buf,size_t bufsiz,const char * fmt,const gpt_uuid_t uu) gpt_uuid_snprintf() argument [all...] |
| /netbsd-src/external/bsd/libbind/dist/irs/ |
| H A D | getnameinfo.c | 287 size_t bufsiz, int flags) in ip6_sa2str() argument 298 if (bufsiz != 0U) { in ip6_sa2str() 299 strncpy(buf, tmp, bufsiz - 1); in ip6_sa2str() 300 buf[bufsiz - 1] = '\0'; in ip6_sa2str() 318 bufsiz >= IF_NAMESIZE) { in ip6_sa2str() 328 if (bufsiz != 0U) { in ip6_sa2str() 329 strncpy(buf, tmp, bufsiz - 1); in ip6_sa2str() 330 buf[bufsiz - 1] = '\0'; in ip6_sa2str()
|
| H A D | gethostent.c | 494 static unsigned int bufsiz = 4095; in scan_interfaces6() local 506 buf = memget(bufsiz); in scan_interfaces6() 513 lifc.lifc_len = bufsiz; in scan_interfaces6() 524 if (lifc.lifc_len + 2 * sizeof(lifreq) < bufsiz) in scan_interfaces6() 530 if (bufsiz > 1000000) in scan_interfaces6() 533 memput(buf, bufsiz); in scan_interfaces6() 534 bufsiz += 4096; in scan_interfaces6() 599 memput(buf, bufsiz); in scan_interfaces6() 605 memput(buf, bufsiz); in scan_interfaces6() 650 static unsigned int bufsiz = 4095; in scan_interfaces() local [all …]
|
| H A D | lcl_pr.c | 204 int c, bufsiz, offset; in pr_next() local 215 bufsiz = BUFSIZ; in pr_next() 218 if ((p = fgets(bufp + offset, bufsiz - offset, pvt->fp)) == NULL) { in pr_next() 227 if ((ndbuf = malloc(bufsiz + GROWBUF)) != NULL) in pr_next() 230 ndbuf = realloc(dbuf, bufsiz + GROWBUF); in pr_next() 234 bufsiz += GROWBUF; in pr_next()
|
| /netbsd-src/crypto/external/bsd/openssl/dist/apps/lib/ |
| H A D | apps_ui.c | 164 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()
|
| /netbsd-src/lib/libc/locale/ |
| H A D | _wcstod.h | 66 size_t bufsiz, len; in INT_NAME() local 95 bufsiz = len; in INT_NAME() 96 buf = (void *)malloc(bufsiz + 1); in INT_NAME() 101 len = wcstombs_l(buf, src, bufsiz + 1, loc); in INT_NAME() 103 _DIAGASSERT(len == bufsiz); in INT_NAME()
|
| /netbsd-src/sys/ddb/ |
| H A D | db_output.c | 220 db_format_radix(char *buf, size_t bufsiz, quad_t val, int altflag) in db_format_radix() argument 225 db_format_hex(buf, bufsiz, val, altflag); in db_format_radix() 239 snprintf(buf, bufsiz, fmt, val); in db_format_radix() 246 db_format_hex(char *buf, size_t bufsiz, quad_t val, int altflag) in db_format_hex() argument 256 snprintf(buf, bufsiz, fmt, val); in db_format_hex()
|
| /netbsd-src/crypto/external/bsd/openssh/dist/ |
| H A D | readpassphrase.c | 47 readpassphrase(prompt, buf, bufsiz, flags) in readpassphrase() argument 50 size_t bufsiz; 67 return getpassfd(prompt, buf, bufsiz, NULL, gflags, 0); 75 if (bufsiz == 0) { 117 end = buf + bufsiz - 1;
|
| /netbsd-src/sys/arch/zaurus/stand/zboot/ |
| H A D | diskprobe.c | 66 hardprobe(char *buf, size_t bufsiz) in hardprobe() argument 98 strlcat(buf, dip->devname, bufsiz); in hardprobe() 103 strlcat(buf, "*", bufsiz); in hardprobe() 129 strlcat(buf, " ", bufsiz); in hardprobe() 133 strlcat(buf, devname_path, bufsiz); in hardprobe() 134 strlcat(buf, "*", bufsiz); in hardprobe() 261 diskprobe(char *buf, size_t bufsiz) in diskprobe() argument 272 hardprobe(buf, bufsiz); in diskprobe()
|
| /netbsd-src/external/bsd/libarchive/dist/libarchive_fe/ |
| H A D | passphrase.c | 83 readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) in readpassphrase() argument 111 success = ReadFile(hStdin, buf, (DWORD)bufsiz - 1, &rbytes, NULL); in readpassphrase() 166 readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) in readpassphrase() argument 178 if (bufsiz == 0) { in readpassphrase() 249 end = buf + bufsiz - 1; in readpassphrase() 321 lafe_readpassphrase(const char *prompt, char *buf, size_t bufsiz) in lafe_readpassphrase() argument 325 p = readpassphrase(prompt, buf, bufsiz, RPP_ECHO_OFF); in lafe_readpassphrase()
|
| /netbsd-src/external/cddl/osnet/dist/uts/common/fs/zfs/ |
| H A D | lz4.c | 55 uint32_t bufsiz; in lz4_compress() local 58 ASSERT(d_len >= sizeof (bufsiz)); in lz4_compress() 60 bufsiz = real_LZ4_compress(s_start, &dest[sizeof (bufsiz)], s_len, in lz4_compress() 61 d_len - sizeof (bufsiz)); in lz4_compress() 64 if (bufsiz == 0) in lz4_compress() 73 *(uint32_t *)dest = BE_32(bufsiz); in lz4_compress() 75 return (bufsiz + sizeof (bufsiz)); in lz4_compress() 83 uint32_t bufsiz = BE_IN32(src); in lz4_decompress() local 86 if (bufsiz + sizeof (bufsiz) > s_len) in lz4_decompress() 93 return (LZ4_uncompress_unknownOutputSize(&src[sizeof (bufsiz)], in lz4_decompress() [all …]
|
| /netbsd-src/external/gpl3/binutils.old/dist/bfd/ |
| H A D | elf.c | 11624 int *bufsiz, in elfcore_write_note() argument 11641 buf = (char *) realloc (buf, *bufsiz + newspace); in elfcore_write_note() 11644 dest = buf + *bufsiz; in elfcore_write_note() 11645 *bufsiz += newspace; in elfcore_write_note() 11691 int *bufsiz, in elfcore_write_prpsinfo() argument 11700 ret = (*bed->elf_backend_write_core_note) (abfd, buf, bufsiz, in elfcore_write_prpsinfo() 11721 return elfcore_write_note (abfd, buf, bufsiz, in elfcore_write_prpsinfo() 11738 return elfcore_write_note (abfd, buf, bufsiz, in elfcore_write_prpsinfo() 11752 (bfd *abfd, char *buf, int *bufsiz, in elfcore_write_linux_prpsinfo32() argument 11760 return elfcore_write_note (abfd, buf, bufsiz, "CORE", NT_PRPSINFO, in elfcore_write_linux_prpsinfo32() [all …]
|
| /netbsd-src/crypto/external/bsd/heimdal/dist/lib/kafs/ |
| H A D | rxkad_kdf.c | 135 compress_parity_bits(void *buffer, size_t *bufsiz) in compress_parity_bits() argument 140 if (*bufsiz % 8 != 0) in compress_parity_bits() 143 nk = *bufsiz / 8; in compress_parity_bits() 154 *bufsiz = 7 * nk; in compress_parity_bits()
|
| /netbsd-src/external/gpl3/binutils/dist/bfd/ |
| H A D | elf.c | 12363 int *bufsiz, in elfcore_write_note() argument 12380 buf = (char *) realloc (buf, *bufsiz + newspace); in elfcore_write_note() 12383 dest = buf + *bufsiz; in elfcore_write_note() 12384 *bufsiz += newspace; in elfcore_write_note() 12430 int *bufsiz, in elfcore_write_prpsinfo() argument 12439 ret = (*bed->elf_backend_write_core_note) (abfd, buf, bufsiz, in elfcore_write_prpsinfo() 12460 return elfcore_write_note (abfd, buf, bufsiz, in elfcore_write_prpsinfo() 12477 return elfcore_write_note (abfd, buf, bufsiz, in elfcore_write_prpsinfo() 12491 (bfd *abfd, char *buf, int *bufsiz, in elfcore_write_linux_prpsinfo32() argument 12499 return elfcore_write_note (abfd, buf, bufsiz, "CORE", NT_PRPSINFO, in elfcore_write_linux_prpsinfo32() [all …]
|