Home
last modified time | relevance | path

Searched refs:buf (Results 101 – 125 of 4419) sorted by relevance

12345678910>>...177

/illumos-gate/usr/src/lib/libmail/common/
H A Dgetdomain.c73 while (fgets(buf, size, fp)) in look4domain()
74 if (strncmp(buf, "domain", 6) == 0) in look4domain()
75 if (isspace(buf[6])) { in look4domain()
76 char *x = skipspace(buf + 6); in look4domain()
79 strmove(buf, x); in look4domain()
80 ret = buf; in look4domain()
90 static char *readdomain(char *buf, int size) in readdomain() argument
95 (void) strncpy(buf, ret, size); in readdomain()
96 return (buf); in readdomain()
105 if (sysinfo(SI_SRPC_DOMAIN, buf, size) >= 0) in readdomain()
[all …]
/illumos-gate/usr/src/uts/common/io/ixgbe/
H A Dixgbe_log.c40 char buf[LOG_BUF_LEN]; in ixgbe_notice() local
44 (void) vsnprintf(buf, sizeof (buf), fmt, ap); in ixgbe_notice()
49 buf); in ixgbe_notice()
51 cmn_err(CE_NOTE, "%s: %s", MODULE_NAME, buf); in ixgbe_notice()
61 char buf[LOG_BUF_LEN]; in ixgbe_log() local
65 (void) vsnprintf(buf, sizeof (buf), fmt, ap); in ixgbe_log()
70 buf); in ixgbe_log()
72 cmn_err(CE_NOTE, "!%s: %s", MODULE_NAME, buf); in ixgbe_log()
82 char buf[LOG_BUF_LEN]; in ixgbe_error() local
86 (void) vsnprintf(buf, sizeof (buf), fmt, ap); in ixgbe_error()
[all …]
/illumos-gate/usr/src/lib/libipmi/common/
H A Dipmi_util.c186 char *buf, size_t len) in ipmi_sensor_reading_name() argument
246 *buf = '\0'; in ipmi_decode_string()
254 *(buf+len) = '\0'; in ipmi_decode_string()
264 *buf = '\0'; in ipmi_decode_string()
281 *buf++ = (char)(tmp + 32); in ipmi_decode_string()
286 *buf++ = (char)(tmp + 32); in ipmi_decode_string()
291 *buf++ = (char)(tmp + 32); in ipmi_decode_string()
294 *buf++ = (char)(tmp + 32); in ipmi_decode_string()
299 *buf++ = (char)(tmp + 32); in ipmi_decode_string()
303 *buf++ = (char)(tmp + 32); in ipmi_decode_string()
[all …]
/illumos-gate/usr/src/cmd/pwck/
H A Dpwck.c61 static char buf[512]; variable
108 while (fgets(buf, sizeof (buf), fptr) != NULL) { in main()
117 if (buf[0] == '+' || buf[0] == '-') { in main()
129 if (buf[i] == ':') { in main()
146 if (buf[0] == ':') in main()
152 if (!isalnum(buf[i]) && in main()
153 buf[i] != '_' && in main()
154 buf[i] != '-' && in main()
155 buf[i] != '.') in main()
191 logbuf[j] = buf[i]; in main()
[all …]
/illumos-gate/usr/src/uts/common/ktli/
H A Dt_kfree.c86 if (p.bind->addr.buf != NULL) in t_kfree()
94 if (p.call->addr.buf != NULL) in t_kfree()
96 if (p.call->opt.buf != NULL) in t_kfree()
98 if (p.call->udata.buf != NULL) in t_kfree()
106 if (p.opt->opt.buf != NULL) in t_kfree()
114 if (p.dis->udata.buf != NULL) in t_kfree()
130 if (p.udata->opt.buf != NULL) in t_kfree()
132 if (p.udata->addr.buf != NULL) { in t_kfree()
134 p.udata->addr.buf); in t_kfree()
145 if (p.uderr->addr.buf != NULL) in t_kfree()
[all …]
/illumos-gate/usr/src/cmd/saf/
H A Dadmutil.c89 (void) strcpy(buf, HOME);
92 (void) strcat(buf, "/");
93 (void) strcat(buf, bname);
94 (void) strcat(buf, "/.");
95 (void) strcat(buf, (p + 1));
98 return(buf);
156 (void) unlink(buf);
157 if (rename(tname, buf) < 0) {
242 p = trim(buf); in find_pm()
328 if (access(buf, 0) < 0) { in do_config()
[all …]
/illumos-gate/usr/src/lib/libdisasm/common/
H A Ddis_riscv.c1402 imm, buf, buflen); in dis_riscv_c_ldsp()
1414 imm, buf, buflen); in dis_riscv_c_flwsp()
1426 imm, buf, buflen); in dis_riscv_c_fldsp()
1437 buf, buflen); in dis_riscv_c_swsp()
1448 buf, buflen); in dis_riscv_c_sdsp()
1459 buf, buflen); in dis_riscv_c_fswsp()
1470 buf, buflen); in dis_riscv_c_fsdsp()
1483 imm, buf, buflen); in dis_riscv_c_lw()
1495 imm, buf, buflen); in dis_riscv_c_ld()
1508 imm, buf, buflen); in dis_riscv_c_flw()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/path/
H A Dpathfind.c103 return buf; in pathfind()
108 if (regular(buf, &st)) in pathfind()
109 return buf; in pathfind()
122 if (regular(buf, &st)) in pathfind()
123 return buf; in pathfind()
127 if (regular(buf, &st)) in pathfind()
128 return buf; in pathfind()
140 return buf; in pathfind()
145 return buf; in pathfind()
159 return buf; in pathfind()
[all …]
/illumos-gate/usr/src/cmd/sendmail/libsm/
H A Dt-float.c26 char buf[128]; variable
37 sm_snprintf(buf, sizeof(buf), "%d %.3f %d", 0, d, 1);
39 if (!SM_TEST(strcmp(buf, r) == 0))
41 "got %s instead\n", buf);
44 sm_snprintf(buf, sizeof(buf), "%.3f", d);
46 if (!SM_TEST(strcmp(buf, r) == 0))
48 "got %s instead\n", buf);
50 sm_io_sscanf(buf, "%lf", &d2);
66 sm_snprintf(buf, sizeof(buf), "%.3f %.1f", d, ld);
68 if (!SM_TEST(strcmp(buf, r) == 0))
[all …]
/illumos-gate/usr/src/cmd/dispadmin/
H A Dfxdispadmin.c263 if (fgets(buf, sizeof (buf), fp) == NULL) in set_fxdptbl()
266 } while (buf[0] == '#' || buf[0] == '\0' || in set_fxdptbl()
267 (wslength = strspn(buf, " \t\n")) == strlen(buf) || in set_fxdptbl()
268 strchr(buf, '#') == buf + wslength); in set_fxdptbl()
301 if (fgets(buf, sizeof (buf), fp) == NULL) in set_fxdptbl()
305 } while (buf[0] == '#' || buf[0] == '\0' || in set_fxdptbl()
306 (wslength = strspn(buf, " \t\n")) == strlen(buf) || in set_fxdptbl()
307 strchr(buf, '#') == buf + wslength); in set_fxdptbl()
341 while (fgets(buf, sizeof (buf), fp) != NULL) { in set_fxdptbl()
342 if (buf[0] != '#' && buf[0] != '\0' && in set_fxdptbl()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/comp/
H A Dmktemp.c44 temp(char* buf, int* fdp) in temp() argument
51 len = strlen(buf); in temp()
52 if (s = strrchr(buf, '/')) in temp()
55 d = buf; in temp()
59 s = buf; in temp()
63 *buf = 0; in temp()
68 *buf = 0; in temp()
70 return buf; in temp()
74 mktemp(char* buf) in mktemp() argument
76 return temp(buf, NiL); in mktemp()
[all …]
/illumos-gate/usr/src/cmd/mailx/
H A Dlpaths.c55 static char buf[PATHSIZE]; in libpath() local
57 snprintf(buf, sizeof (buf), "%s/%s", LIBPATH, file); in libpath()
58 return (buf); in libpath()
67 static char buf[PATHSIZE]; in helppath() local
72 snprintf(buf, sizeof (buf), "%s/%s/LC_MESSAGES/%s", in helppath()
74 if (access(buf, 0) == 0) in helppath()
75 return (buf); in helppath()
77 snprintf(buf, sizeof (buf), "%s/%s", LIBPATH, file); in helppath()
78 return (buf); in helppath()
/illumos-gate/usr/src/lib/libresolv2/common/isc/
H A Dctl_p.c77 REQUIRE(!allocated_p(*buf) && buf->used == 0U); in ctl_bufget()
79 if (!allocated_p(*buf)) { in ctl_bufget()
83 buf->used = 0; in ctl_bufget()
90 REQUIRE(allocated_p(*buf)); in ctl_bufput()
92 buf->text = NULL; in ctl_bufput()
93 buf->used = 0; in ctl_bufput()
98 char *buf, size_t size, in ctl_sa_ntop() argument
122 return (buf); in ctl_sa_ntop()
141 return (buf); in ctl_sa_ntop()
152 buf[x - 1] = '\0'; in ctl_sa_ntop()
[all …]
/illumos-gate/usr/src/lib/libresolv/
H A Dres_init.c98 char buf[BUFSIZ]; in res_init() local
115 char *buf; in res_init() local
126 if (buf == NULL) { in res_init()
132 ifc.ifc_buf = buf; in res_init()
136 free(buf); in res_init()
150 free(buf); in res_init()
159 free(buf); in res_init()
171 if (buf[0] == '+') in res_init()
172 buf[0] = '.'; in res_init()
176 cp = index(buf, '.'); in res_init()
[all …]
/illumos-gate/usr/src/cmd/mailwrapper/
H A Dfgetln.c46 static char *buf = NULL; in fgetln() local
51 if (buf == NULL) { in fgetln()
53 if ((buf = malloc(bufsiz)) == NULL) in fgetln()
57 if (fgets(buf, bufsiz, fp) == NULL) in fgetln()
63 char *nbuf = realloc(buf, nbufsiz); in fgetln()
67 free(buf); in fgetln()
69 buf = NULL; in fgetln()
72 buf = nbuf; in fgetln()
76 return (buf); in fgetln()
81 *len = (ptr - buf) + 1; in fgetln()
[all …]
/illumos-gate/usr/src/lib/fm/topo/modules/i86pc/chip/
H A Dchip_temp.c37 char buf[PATH_MAX]; in chip_create_core_temp_sensor() local
46 if (snprintf(buf, sizeof (buf), "%s/chip%d.core%d", chip_sensor_base, in chip_create_core_temp_sensor()
47 chip, core) >= sizeof (buf)) { in chip_create_core_temp_sensor()
56 if (stat(buf, &st) != 0) { in chip_create_core_temp_sensor()
68 if (snprintf(buf, sizeof (buf), "%s/procnode.%d", in chip_create_core_temp_sensor()
69 chip_sensor_base, procnode) >= sizeof (buf)) { in chip_create_core_temp_sensor()
74 return (topo_sensor_create_scalar_sensor(mod, pnode, buf, "temp")); in chip_create_core_temp_sensor()
81 char buf[PATH_MAX]; in chip_create_chip_temp_sensor() local
85 if (snprintf(buf, sizeof (buf), "%s/chip%d", chip_sensor_base, in chip_create_chip_temp_sensor()
86 chip) >= sizeof (buf)) { in chip_create_chip_temp_sensor()
[all …]
/illumos-gate/usr/src/uts/common/os/
H A Dstrext.c44 (void) vsnprintf(buf, buflen, fmt, args); in vsprintf_len()
45 return (buf); in vsprintf_len()
58 (void) vsnprintf(buf, buflen, fmt, args); in sprintf_len()
61 return (buf); in sprintf_len()
130 sprintf(char *buf, const char *fmt, ...) in sprintf() argument
138 return (buf); in sprintf()
145 return (buf); in vsprintf()
157 char *buf; in kmem_asprintf() local
163 buf = kmem_alloc(size, KM_SLEEP); in kmem_asprintf()
166 size = vsnprintf(buf, size, fmt, adx); in kmem_asprintf()
[all …]
/illumos-gate/usr/src/lib/smbsrv/libsmb/common/
H A Dsmb_door_encdec.c45 char *buf; in smb_common_encode() local
55 if ((buf = malloc(len)) == NULL) { in smb_common_encode()
61 xdrmem_create(&xdrs, buf, len, XDR_ENCODE); in smb_common_encode()
66 free(buf); in smb_common_encode()
67 buf = NULL; in smb_common_encode()
72 return (buf); in smb_common_encode()
100 char *buf = NULL; in smb_string_encode() local
103 if ((obj.buf = s) == NULL) { in smb_string_encode()
109 if ((buf = calloc(len, 1)) == NULL) { in smb_string_encode()
119 free(buf); in smb_string_encode()
[all …]
/illumos-gate/usr/src/uts/common/io/sfxge/
H A Dsfxge_vpd.c42 void *buf; in sfxge_vpd_get_keyword() local
48 buf = kmem_zalloc(size, KM_NOSLEEP); in sfxge_vpd_get_keyword()
49 if (buf == NULL) { in sfxge_vpd_get_keyword()
54 if ((rc = efx_vpd_read(enp, buf, size)) != 0) in sfxge_vpd_get_keyword()
70 kmem_free(buf, size); in sfxge_vpd_get_keyword()
80 kmem_free(buf, size); in sfxge_vpd_get_keyword()
94 void *buf; in sfxge_vpd_set_keyword() local
102 buf = kmem_zalloc(size, KM_NOSLEEP); in sfxge_vpd_set_keyword()
103 if (buf == NULL) { in sfxge_vpd_set_keyword()
135 kmem_free(buf, size); in sfxge_vpd_set_keyword()
[all …]
/illumos-gate/usr/src/cmd/mdb/common/mdb/
H A Dmdb_module_load.c50 char buf[MAXPATHLEN], *p, *q; in mdb_module_load() local
58 (void) mdb_iob_snprintf(buf, sizeof (buf), "%s", in mdb_module_load()
64 if ((p = strrchr(buf, '.')) != NULL) { in mdb_module_load()
82 name = buf; in mdb_module_load()
112 (void) mdb_iob_snprintf(buf, sizeof (buf), in mdb_module_load()
115 "checking for %s\n", buf); in mdb_module_load()
116 if (access(buf, F_OK) == 0) { in mdb_module_load()
125 "checking for %s\n", buf); in mdb_module_load()
126 if (access(buf, F_OK) == 0) { in mdb_module_load()
133 (void) mdb_iob_snprintf(buf, sizeof (buf), "%s/%s.so", in mdb_module_load()
[all …]
H A Dmdb_umem.c92 char buf[64]; in mdb_umem_handler()
94 (void) mdb_iob_snprintf(buf, sizeof (buf), in mdb_umem_handler()
112 (void) memset(buf, '\b', strlen(buf)); in mdb_umem_handler()
116 (void) memset(buf, ' ', strlen(buf)); in mdb_umem_handler()
120 (void) memset(buf, '\b', strlen(buf)); in mdb_umem_handler()
155 uint32_t *buf = buf_arg; in mdb_umem_copy_pattern() local
157 while (buf < bufend - 3) { in mdb_umem_copy_pattern()
158 buf[3] = buf[2] = buf[1] = buf[0] = pattern; in mdb_umem_copy_pattern()
159 buf += 4; in mdb_umem_copy_pattern()
162 while (buf < bufend) in mdb_umem_copy_pattern()
[all …]
/illumos-gate/usr/src/cmd/msgfmt/
H A Dcheck_header.c88 char *mbuf, *p, *buf; in check_gnu() local
96 buf = NULL; in check_gnu()
208 buf[index] = '\0'; in check_gnu()
256 buf[index++] = c; in check_gnu()
273 buf[index++] = n; in check_gnu()
279 buf[index++] = mc; in check_gnu()
303 buf = (char *)Xrealloc(buf, bufsize); in check_gnu()
311 free(buf); in check_gnu()
323 free(buf); in check_gnu()
333 if (buf) in check_gnu()
[all …]
/illumos-gate/usr/src/tools/smatch/src/
H A Dsmatch_parse_call_math.c124 char buf[256]; in read_rl_from_var() local
154 snprintf(buf, sizeof(buf), "%s%s", name, star ? "->" : "."); in read_rl_from_var()
157 if (*end - p + strlen(buf) >= sizeof(buf)) in read_rl_from_var()
366 cur = buf; in format_expr_helper()
412 ret = format_expr_helper(buf, sizeof(buf), expr); in format_expr()
435 ret = format_expr_helper(buf, sizeof(buf), expr); in get_value_in_terms_of_parameter_math()
462 ret = format_expr_helper(buf, sizeof(buf), expr); in get_value_in_terms_of_parameter_math_var_sym()
488 char buf[256]; in swap_format() local
506 out = buf; in swap_format()
518 if (out >= buf + sizeof(buf)) in swap_format()
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dfmtmsg.c963 buf += strlcpy(buf, lcllbl, ebuf - buf); in writemsg()
970 buf += strlcpy(buf, SEPSTR, ebuf - buf); in writemsg()
980 buf += strlcpy(buf, sevpstr, ebuf - buf); in writemsg()
987 buf += strlcpy(buf, SEPSTR, ebuf - buf); in writemsg()
994 *buf++ = c; in writemsg()
1014 buf += strlcpy(buf, ACTINTRO, ebuf - buf); in writemsg()
1019 *buf++ = c; in writemsg()
1033 buf += strlcpy(buf, " ", ebuf - buf); in writemsg()
1038 buf += strlcpy(buf, lcltag, ebuf - buf); in writemsg()
1045 *buf++ = '\n'; in writemsg()
[all …]
H A Dassert.c48 char buf[512]; in _assert() local
50 (void) snprintf(buf, sizeof (buf), in _assert()
53 (void) write(2, buf, strlen(buf)); in _assert()
54 __set_panicstr(buf); in _assert()
67 char buf[512]; in _assert_c99() local
69 (void) snprintf(buf, sizeof (buf), in _assert_c99()
73 (void) write(2, buf, strlen(buf)); in _assert_c99()
74 __set_panicstr(buf); in _assert_c99()

12345678910>>...177