Home
last modified time | relevance | path

Searched refs:sbuf (Results 1 – 25 of 163) sorted by relevance

1234567

/illumos-gate/usr/src/cmd/man/
H A Dmakewhatis.c71 #define sbuf_length(sbuf) ((sbuf)->end - (sbuf)->content) argument
148 sbuf_clear(struct sbuf *sbuf) in sbuf_clear() argument
151 sbuf->end = sbuf->content; in sbuf_clear()
160 struct sbuf *sbuf; in new_sbuf() local
177 sbuf_need(struct sbuf *sbuf, int nchars) in sbuf_need() argument
188 if (sbuf->end + nchars > sbuf->last) { in sbuf_need()
189 size = sbuf->last + 1 - sbuf->content; in sbuf_need()
191 cntsize = sbuf->end - sbuf->content; in sbuf_need()
238 sbuf->end = copy(text, sbuf->end, length); in sbuf_append_edited()
249 while (sbuf->end > sbuf->content && strchr(set, sbuf->end[-1]) != NULL) in sbuf_strip()
[all …]
/illumos-gate/usr/src/uts/common/inet/kifconf/
H A Dkifconf.c69 struct netbuf sbuf; in kdlifconfig() local
84 sbuf.buf = (caddr_t)&sin; in kdlifconfig()
85 sbuf.maxlen = sbuf.len = sizeof (sin); in kdlifconfig()
91 sbuf.buf = (caddr_t)&sin6; in kdlifconfig()
92 sbuf.maxlen = sbuf.len = sizeof (sin6); in kdlifconfig()
103 sbuf.buf = (caddr_t)&sin; in kdlifconfig()
104 sbuf.maxlen = sbuf.len = sizeof (sin); in kdlifconfig()
110 sbuf.buf = (caddr_t)&sin6; in kdlifconfig()
111 sbuf.maxlen = sbuf.len = sizeof (sin6); in kdlifconfig()
127 sbuf.maxlen = sbuf.len = sizeof (sin); in kdlifconfig()
[all …]
/illumos-gate/usr/src/uts/intel/io/intel_nhm/
H A Ddimm_topo.c141 char sbuf[65]; in inhm_dimm() local
147 (void) snprintf(sbuf, sizeof (sbuf), "%dG", in inhm_dimm()
150 (void) snprintf(sbuf, sizeof (sbuf), "%dM", in inhm_dimm()
166 sbuf[t] = 0; in inhm_dimm()
172 sbuf[t] = 0; in inhm_dimm()
177 (void) strncpy(sbuf, nhm_dimm->part_number, t); in inhm_dimm()
178 sbuf[t] = 0; in inhm_dimm()
183 (void) strncpy(sbuf, nhm_dimm->revision, t); in inhm_dimm()
184 sbuf[t] = 0; in inhm_dimm()
188 (void) strncpy(sbuf, nhm_dimm->label, t); in inhm_dimm()
[all …]
/illumos-gate/usr/src/lib/libmail/common/
H A Dmaillock.c63 struct stat sbuf; in maillock() local
86 if (stat(curlock, &sbuf) < 0) { in maillock()
102 if (t < sbuf.st_ctime + 300) { in maillock()
131 struct stat sbuf; in lock1() local
136 (void) fstat(fd, &sbuf); in lock1()
149 return (sbuf.st_ctime); in lock1()
162 struct stat sbuf; in touchlock() local
174 if (stat(curlock, &sbuf) < 0) in touchlock()
181 tp.actime = sbuf.st_atime; in touchlock()
182 tp.modtime = sbuf.st_mtime; in touchlock()
/illumos-gate/usr/src/test/zfs-tests/cmd/mkbusy/
H A Dmkbusy.c71 struct stat sbuf; in main() local
96 if ((ret = stat(argv[0], &sbuf)) != 0) { in main()
130 if ((ret = stat(dname, &sbuf)) != 0 || !(sbuf.st_mode & in main()
143 } else if ((sbuf.st_mode & S_IFMT) == S_IFREG || in main()
144 (sbuf.st_mode & S_IFMT) == S_IFLNK || in main()
145 (sbuf.st_mode & S_IFMT) == S_IFCHR || in main()
146 (sbuf.st_mode & S_IFMT) == S_IFBLK) { in main()
148 } else if ((sbuf.st_mode & S_IFMT) == S_IFDIR) { in main()
/illumos-gate/usr/src/cmd/listen/
H A Dnstoa.c77 char sbuf[SBUFSIZE]; variable
120 addr->len = dobase(++str, sbuf, HEX);
125 addr->len = dobase(++str, sbuf, OCT);
129 addr->len = dostring(str, sbuf, 0);
142 addr->len = dostring(str, sbuf, quote);
340 sbuf[0] = '\\';
341 sbuf[1] = 'o';
343 return xfer(str, sbuf, o_atos(sbuf+2, addr->buf, addr->len) + 2,
348 sbuf[0] = '\\';
349 sbuf[1] = 'x';
[all …]
/illumos-gate/usr/src/lib/lib9p/common/sbuf/
H A Dsbuf.h35 struct sbuf struct
40 struct sbuf *sbuf_new_auto(void); argument
41 char *sbuf_data(struct sbuf *s);
42 int sbuf_printf(struct sbuf *s, const char *fmt, ...);
43 void sbuf_delete(struct sbuf *s);
H A Dsbuf.c32 struct sbuf *
35 struct sbuf *s; in sbuf_new_auto()
37 s = malloc(sizeof(struct sbuf)); in sbuf_new_auto()
48 sbuf_printf(struct sbuf *s, const char *fmt, ...) in sbuf_printf()
61 sbuf_delete(struct sbuf *s) in sbuf_delete()
/illumos-gate/usr/src/uts/intel/io/intel_nb5000/
H A Dintel_nbdrv.c163 char sbuf[65]; in inb_dimm() local
169 (void) snprintf(sbuf, sizeof (sbuf), "%dG", in inb_dimm()
172 (void) snprintf(sbuf, sizeof (sbuf), "%dM", in inb_dimm()
175 (void) nvlist_add_string(newdimm, "dimm-size", sbuf); in inb_dimm()
195 (void) snprintf(sbuf, sizeof (sbuf), "%04x%02x%02x%02x%08x", in inb_dimm()
204 (void) strncpy(sbuf, nb_dimm->part_number, t); in inb_dimm()
205 sbuf[t] = 0; in inb_dimm()
210 (void) strncpy(sbuf, nb_dimm->revision, t); in inb_dimm()
211 sbuf[t] = 0; in inb_dimm()
215 (void) strncpy(sbuf, nb_dimm->label, t); in inb_dimm()
[all …]
/illumos-gate/usr/src/ucbcmd/vipw/
H A Dvipw.c72 struct stat osbuf, sbuf, oshdbuf, shdbuf; in main() local
95 if (stat(ptemp, &sbuf) < 0) { in main()
102 o_mtime = sbuf.st_mtime; in main()
127 if (((osbuf.st_gid != sbuf.st_gid) || in main()
128 (osbuf.st_uid != sbuf.st_uid)) && in main()
167 if (((osbuf.st_gid != sbuf.st_gid) || in main()
168 (osbuf.st_uid != sbuf.st_uid)) && in main()
263 struct stat sbuf, statbuf; in sanity_check() local
271 if (stat(temp, &sbuf) < 0) { in sanity_check()
277 *mtime = sbuf.st_mtime; in sanity_check()
[all …]
/illumos-gate/usr/src/lib/libnsl/dial/
H A Dstoa.c83 static char *sbuf; in stoa() local
105 if (sbuf == NULL) { in stoa()
106 sbuf = malloc(SBUFSIZE); in stoa()
107 if (sbuf == NULL) in stoa()
118 addr->len = dobase(++str, sbuf, HEX); in stoa()
123 addr->len = dobase(++str, sbuf, OCT); in stoa()
137 if ((addr->buf = xfer(addr->buf, sbuf, addr->len, addr->maxlen)) == in stoa()
/illumos-gate/usr/src/cmd/oamuser/group/
H A Ddel_group.c57 struct stat sbuf; in del_group() local
64 if (fstat(fileno(e_fptr), &sbuf) != 0) in del_group()
80 if (fchmod(fd, sbuf.st_mode) != 0 || in del_group()
81 fchown(fd, sbuf.st_uid, sbuf.st_gid) != 0) { in del_group()
H A Dmod_group.c57 struct stat sbuf; in mod_group() local
64 if (fstat(fileno(e_fptr), &sbuf) != 0) in mod_group()
80 if (fchmod(fd, sbuf.st_mode) != 0 || in mod_group()
81 fchown(fd, sbuf.st_uid, sbuf.st_gid) != 0) { in mod_group()
/illumos-gate/usr/src/cmd/script/
H A Dscript.c222 struct termios sbuf; in fixtty() local
224 sbuf = b; in fixtty()
225 sbuf.c_iflag &= ~(INLCR|IGNCR|ICRNL|IUCLC|IXON); in fixtty()
226 sbuf.c_oflag &= ~OPOST; in fixtty()
227 sbuf.c_lflag &= ~(ICANON|ISIG|ECHO); in fixtty()
228 sbuf.c_cc[VMIN] = 1; in fixtty()
229 sbuf.c_cc[VTIME] = 0; in fixtty()
230 (void) ioctl(0, TCSETSF, (char *)&sbuf); in fixtty()
/illumos-gate/usr/src/lib/lib9p/common/
H A Dutils.c69 const struct descbits *, struct sbuf *);
72 static void l9p_describe_name(const char *, char *, struct sbuf *);
77 enum l9p_version, struct sbuf *);
79 struct sbuf *);
84 static void l9p_describe_getattr_mask(uint64_t, struct sbuf *);
279 const struct descbits *db, struct sbuf *sb) in l9p_describe_bits()
323 l9p_describe_fid(const char *str, uint32_t fid, struct sbuf *sb) in l9p_describe_fid()
405 l9p_describe_name(const char *str, char *name, struct sbuf *sb) in l9p_describe_name()
622 enum l9p_version version, struct sbuf *sb) in l9p_describe_l9stat()
694 l9p_describe_readdir(struct sbuf *sb, struct l9p_f_io *io) in l9p_describe_readdir()
[all …]
/illumos-gate/usr/src/common/devid/
H A Ddevid.c197 char *sbuf, *dsp, *dp, ta; in ddi_devid_str_encode() local
202 if ((sbuf = DEVID_MALLOC(4)) == NULL) in ddi_devid_str_encode()
204 *(sbuf+0) = DEVID_MAGIC_MSB; in ddi_devid_str_encode()
205 *(sbuf+1) = DEVID_MAGIC_LSB; in ddi_devid_str_encode()
206 *(sbuf+2) = '0'; in ddi_devid_str_encode()
207 *(sbuf+3) = 0; in ddi_devid_str_encode()
208 return (sbuf); in ddi_devid_str_encode()
243 if ((sbuf = DEVID_MALLOC(slen)) == NULL) in ddi_devid_str_encode()
247 dsp = sbuf; in ddi_devid_str_encode()
282 DEVID_ASSERT((strlen(sbuf) + 1) == slen); in ddi_devid_str_encode()
[all …]
H A Ddevid_smp.c106 char sbuf[16 + 1]; in ddi_devid_smp_encode() local
161 slen = snprintf(sbuf, sizeof (sbuf), "%016" PRIx64, s); in ddi_devid_smp_encode()
162 if ((vlen <= 0) || (plen <= 0) || ((slen + 1) != sizeof (sbuf))) in ddi_devid_smp_encode()
186 bcopy(sbuf, &i_devid->did_id[vlen + 1 + plen + 1], slen); in ddi_devid_smp_encode()
/illumos-gate/usr/src/lib/libresolv2/common/bsd/
H A Dmktemp.c90 struct stat sbuf; in gettemp() local
109 if (stat(path, &sbuf)) in gettemp()
111 if (!S_ISDIR(sbuf.st_mode)) { in gettemp()
128 else if (stat(path, &sbuf)) in gettemp()
/illumos-gate/usr/src/cmd/oamuser/user/
H A Dproj.c50 struct stat sbuf; in edit_project() local
61 if (fstat(fileno(e_fptr), &sbuf) != 0) in edit_project()
78 if (fchmod(fd, sbuf.st_mode) != 0 || in edit_project()
79 fchown(fd, sbuf.st_uid, sbuf.st_gid) != 0) { in edit_project()
H A Dgroups.c59 struct stat sbuf; in edit_group() local
68 if (fstat(fileno(e_fptr), &sbuf) != 0) { in edit_group()
89 if (fchmod(fd, sbuf.st_mode) != 0 || in edit_group()
90 fchown(fd, sbuf.st_uid, sbuf.st_gid) != 0) { in edit_group()
/illumos-gate/usr/src/lib/fm/topo/modules/sun4v/chip/
H A Dchip_sun4v.c242 char sbuf[32]; in cpu_create() local
270 (void) snprintf(sbuf, sizeof (sbuf), "%llx", serial); in cpu_create()
285 (topo_instance_t)pid, sbuf, NULL, NULL, NULL); in cpu_create()
294 if ((asru = cpu_fmri_create(mod, pid, sbuf, 0)) != NULL) { in cpu_create()
349 char sbuf[32]; in chip_create() local
378 (void) snprintf(sbuf, sizeof (sbuf), "%llx", procp->serialno); in chip_create()
379 topo_mod_dprintf(mod, "node chip[%d], sn=%s\n", i, sbuf); in chip_create()
382 sbuf, fru, label, NULL); in chip_create()
/illumos-gate/usr/src/cmd/news/
H A Dnews.c179 struct stat sbuf; in read_dir() local
194 if (nf->d_ino != (ino_t)0 && stat (fname, &sbuf) >= 0 in read_dir()
195 && (sbuf.st_mode & S_IFMT) == S_IFREG) { in read_dir()
216 n_list[n_count-1].n_time = sbuf.st_mtime; in read_dir()
276 struct stat sbuf; in print_item() local
279 fstat (fileno (fd), &sbuf); in print_item()
289 pw = getpwuid (sbuf.st_uid); in print_item()
294 cftime(time_buf, DATE_FMT, &sbuf.st_mtime); in print_item()
/illumos-gate/usr/src/cmd/lp/filter/postscript/postcomm/
H A Dpostcomm.c129 char sbuf[BUFSIZE]; /* for parsing the message */ variable
559 state = sbuf; in getstatus()
561 if (strncmp(sbuf, "%%[", 3) == 0) in getstatus()
563 strtok(sbuf, " "); /* skip the leading "%%[ " */ in getstatus()
704 sbuf[next++] = tolower(ch); in readline()
707 mesg[next] = sbuf[next] = '\0'; in readline()
709 sprintf(sbuf, "%%%%[ status: endofjob ]%%%%\n"); in readline()
/illumos-gate/usr/src/cmd/tip/
H A Dcu.c26 static char sbuf[14]; in cumain() local
92 (void) snprintf(sbuf, sizeof (sbuf), "cu%d", BR); in cumain()
93 if ((i = hunt(sbuf)) == 0) { in cumain()
/illumos-gate/usr/src/lib/libgen/common/
H A Dpathfind.c186 struct stat64 sbuf; in fullck() local
191 if (stat64(name, &sbuf) == -1) in fullck()
193 xor = (sbuf.st_mode ^ mode) & 077000; /* see mknod(2) */ in fullck()
200 if (nzflag && sbuf.st_size == 0) in fullck()

1234567