Home
last modified time | relevance | path

Searched refs:stbuf (Results 1 – 25 of 125) sorted by relevance

12345

/illumos-gate/usr/src/lib/libgen/common/
H A Dcopylist.c83 struct stat64 stbuf; in copylist64() local
86 if (stat64(filenm, &stbuf) == -1) { in copylist64()
89 *szptr = stbuf.st_size; in copylist64()
91 return (common_copylist(filenm, stbuf.st_size)); in copylist64()
99 struct stat64 stbuf; in copylist() local
102 if (stat64(filenm, &stbuf) == -1) { in copylist()
106 if (stbuf.st_size > LONG_MAX) { in copylist()
111 *szptr = (off_t)stbuf.st_size; in copylist()
113 return (common_copylist(filenm, stbuf.st_size)); in copylist()
/illumos-gate/usr/src/cmd/sendmail/libsmutil/
H A Dsafefile.c59 struct stat stbuf; variable
205 if (stat(dir, &stbuf) >= 0)
210 if (stbuf.st_uid == uid)
219 if (stbuf.st_gid == gid)
247 dir, (int) stbuf.st_uid,
410 struct stat stbuf; local
475 ret = lstat(s, &stbuf);
477 ret = stat(s, &stbuf);
487 if (S_ISLNK(stbuf.st_mode))
635 if (stbuf.st_uid == uid &&
[all …]
/illumos-gate/usr/src/cmd/bnu/
H A Dcntrl.c248 struct stat stbuf; in cntrl() local
449 if ((! stat(Dfile, &stbuf)) && in cntrl()
451 ((stbuf.st_gid != UUCPGID) || in cntrl()
482 stbuf.st_size = 0L; in cntrl()
491 startp = stbuf.st_size - (stbuf.st_size % BUFSIZ); in cntrl()
663 if (stbuf.st_size < 0) in cntrl()
811 if ((! stat(Dfile, &stbuf)) && in cntrl()
813 ((stbuf.st_gid != UUCPGID) || in cntrl()
845 startp = stbuf.st_size - (stbuf.st_size % BUFSIZ); in cntrl()
1267 if (stbuf.st_size < 0) in cntrl()
[all …]
H A Dsecurity.c346 struct stat stbuf; local
350 if (stat(srcfile, &stbuf))
352 sprintf(size,"%ld",stbuf.st_size);
368 struct stat stbuf; local
372 if (stat(srcfile, &stbuf))
374 (void) guinfo(stbuf.st_uid,user);
390 struct stat stbuf; local
395 if (stat(srcfile, &stbuf))
397 tp = localtime(&stbuf.st_mtime);
/illumos-gate/usr/src/cmd/mail/
H A Dcopyback.c47 struct stat stbuf; in copyback() local
54 stat(mailfile, &stbuf); in copyback()
55 mailmode = stbuf.st_mode; in copyback()
60 if (stbuf.st_size != let[nlet].adr) { in copyback()
80 let[++nlet].adr = stbuf.st_size; in copyback()
92 if ((stbuf.st_uid != my_euid) && (stbuf.st_uid != my_uid)) { in copyback()
170 delempty(stbuf.st_mode, mailfile); in copyback()
H A Dcksaved.c51 struct stat stbuf; local
61 if ((stat(save, &stbuf) != 0) || (stbuf.st_size == 0))
70 if (stat(mail, &stbuf) != 0) {
/illumos-gate/usr/src/cmd/oamuser/user/
H A Dhomedir.c74 struct stat stbuf; in create_home() local
90 if ((stat(pdir, &stbuf) != 0) || !S_ISDIR(stbuf.st_mode)) { in create_home()
95 if ((strcmp(stbuf.st_fstype, MNTTYPE_ZFS) == 0) && in create_home()
103 if ((dataset = get_mnt_special(pdir, stbuf.st_fstype)) in create_home()
217 struct stat stbuf; in rm_homedir() local
225 if ((stat(dir, &stbuf) != 0) || !S_ISDIR(stbuf.st_mode)) in rm_homedir()
228 if ((strcmp(stbuf.st_fstype, MNTTYPE_ZFS) == 0) && in rm_homedir()
238 if ((nm = get_mnt_special(dir, stbuf.st_fstype)) != NULL) { in rm_homedir()
/illumos-gate/usr/src/lib/libsmbios/common/
H A Dsmb_lib.c60 void *stbuf; in smb_fileopen() local
87 stbuf = smb_alloc(smbe_stlen); in smb_fileopen()
89 if (stbuf == NULL) in smb_fileopen()
93 smb_free(stbuf, smbe_stlen); in smb_fileopen()
97 shp = smbios_bufopen(ep, stbuf, smbe_stlen, version, flags, errp); in smb_fileopen()
102 smb_free(stbuf, smbe_stlen); in smb_fileopen()
114 void *stbuf, *bios, *p, *q; in smb_biosopen() local
220 if ((stbuf = smb_alloc(smbe_stlen)) == NULL) { in smb_biosopen()
225 bcopy((char *)bios + pgoff, stbuf, smbe_stlen); in smb_biosopen()
227 shp = smbios_bufopen(ep, stbuf, smbe_stlen, version, flags, errp); in smb_biosopen()
[all …]
/illumos-gate/usr/src/cmd/lp/cmd/lpsched/
H A Dlpfsck.c55 struct stat stbuf; in lpfsck() local
124 if (Lstat(Lp_Temp, &stbuf) == 0) in lpfsck()
125 switch (stbuf.st_mode & S_IFMT) { in lpfsck()
231 struct stat stbuf; in proto() local
239 exist = (stat(path, &stbuf) == 0); in proto()
254 if (exist && !S_ISDIR(stbuf.st_mode)) { in proto()
267 if (exist && !S_ISREG(stbuf.st_mode)) { in proto()
284 !S_ISREG(stbuf.st_mode) && !S_ISFIFO(stbuf.st_mode)) { in proto()
/illumos-gate/usr/src/cmd/vi/port/
H A Dexpreserve.c101 struct stat64 stbuf; local
150 if (stat64((char *)filname, &stbuf))
152 if (!ISREG(stbuf))
183 struct stat64 stbuf; in copyout() local
222 struct stat64 stbuf; in copyout() local
224 if (stat64((char *)name, &stbuf) == 0) in copyout()
225 if (stbuf.st_size == 0) in copyout()
282 if (lstat64((char *)savdir, &stbuf) < 0 || !S_ISDIR(stbuf.st_mode)) { in copyout()
/illumos-gate/usr/src/cmd/chgrp/
H A Dchgrp.c64 static struct stat stbuf; variable
218 if (lstat(argv[c], &stbuf) < 0) { in main()
222 if (rflag && ((stbuf.st_mode & S_IFMT) == S_IFLNK)) { in main()
300 } else if (rflag && ((stbuf.st_mode & S_IFMT) == S_IFDIR)) { in main()
305 if (add_tnode(&tree, stbuf.st_dev, in main()
306 stbuf.st_ino) == 1) { in main()
311 stbuf.st_mode & ~S_IFMT); in main()
330 if ((stbuf.st_mode & S_IFMT) == S_IFDIR) { in main()
332 stbuf.st_mode & ~S_IFMT); in main()
/illumos-gate/usr/src/lib/libc/port/stdio/
H A D_findbuf.c81 struct stat64 stbuf; in _findbuf() local
83 if (fd != -1 && fstat64(fd, &stbuf) == 0 && stbuf.st_blksize > in _findbuf()
85 size = stbuf.st_blksize; in _findbuf()
/illumos-gate/usr/src/cmd/sgs/ar/common/
H A Dcmd.c96 struct stat stbuf; in rcmd() local
133 stbuf.st_mtime <= fileptr->ar_date) { in rcmd()
141 movefil(fileptr, &stbuf); in rcmd()
559 struct stat stbuf; in cleanup() local
568 f = stats(cmd_info->namv[i], &stbuf); in cleanup()
601 movefil(fileptr, &stbuf); in cleanup()
626 fileptr->ar_size = stbuf->st_size; in movefil()
627 fileptr->ar_date = stbuf->st_mtime; in movefil()
628 fileptr->ar_mode = stbuf->st_mode; in movefil()
652 stats(char *file, struct stat *stbuf) in stats() argument
[all …]
/illumos-gate/usr/src/cmd/tar/
H A Dtar.c1518 sp = &stbuf; in getdir()
2084 &stbuf, stbuf.st_dev, prefix) != 0) { in putfile()
2349 &stbuf, stbuf.st_dev, prefix) != 0) { in putfile()
2382 maxread = max(min(stbuf.st_blksize, stbuf.st_size), in putfile()
2454 &stbuf, stbuf.st_dev, prefix) != 0) in putfile()
2501 filetype, &stbuf, stbuf.st_rdev, prefix) != 0) in putfile()
2549 filetype, &stbuf, stbuf.st_rdev, prefix) != 0) in putfile()
2624 &stbuf, stbuf.st_dev, prefix) != 0) in splitfile()
7233 filetype, &stbuf, stbuf.st_dev, in chk_path_build()
7237 filetype, &stbuf, stbuf.st_dev, prefix)); in chk_path_build()
[all …]
/illumos-gate/usr/src/cmd/mailx/
H A Dlex.c74 struct stat stbuf; in setfile() local
81 if (stat(name, &stbuf) < 0 && errno == EOVERFLOW) { in setfile()
105 fstat(fileno(ibuf), &stbuf); in setfile()
106 if (stbuf.st_size == 0L || (stbuf.st_mode&S_IFMT) != S_IFREG) { in setfile()
110 if (stbuf.st_size == 0L) in setfile()
181 fstat(fileno(ibuf), &stbuf); in setfile()
182 utimep->actime = stbuf.st_atime; in setfile()
183 utimep->modtime = stbuf.st_mtime; in setfile()
958 struct stat stbuf; in inc() local
966 (fstat(fileno(ibuf), &stbuf) < 0) || stbuf.st_size == 0L || in inc()
[all …]
/illumos-gate/usr/src/lib/libm/common/m9x/
H A D__fex_sym.c68 static char *stbuf = NULL; /* symbol and string table buffer */ variable
179 if (stbuf) in __fex_read_syms()
180 free(stbuf); in __fex_read_syms()
182 if ((stbuf = (char*)malloc(size)) == NULL) in __fex_read_syms()
192 read(fd, stbuf, sh[i].sh_size) != sh[i].sh_size || in __fex_read_syms()
195 read(fd, stbuf + sh[i].sh_size, sh[sh[i].sh_link].sh_size) != in __fex_read_syms()
272 s = (Elf_Sym*)stbuf; in __fex_sym()
303 *name = stbuf + stoffset + nm; in __fex_sym()
/illumos-gate/usr/src/cmd/sgs/demo_rdb/common/
H A Dmaps.c152 struct stat stbuf; in display_maps() local
156 if (fstat(ph->pp_mapfd, &stbuf) == -1) in display_maps()
159 ptr = malloc(stbuf.st_size); in display_maps()
160 if (pread(ph->pp_mapfd, ptr, stbuf.st_size, 0) == -1) in display_maps()
171 (uintptr_t)mapptr < ((uintptr_t)ptr + stbuf.st_size); in display_maps()
212 struct stat stbuf; in load_map() local
215 if (fstat(procp->pp_mapfd, &stbuf) == -1) in load_map()
218 ptr = malloc(stbuf.st_size); in load_map()
219 if (pread(procp->pp_mapfd, ptr, stbuf.st_size, 0) == -1) in load_map()
223 (uintptr_t)mapptr < ((uintptr_t)ptr + stbuf.st_size); in load_map()
/illumos-gate/usr/src/cmd/power/
H A Dparse.c127 struct stat stbuf; in lookup_perms() local
142 if (stat("/dev/console", &stbuf) == -1) in lookup_perms()
145 cons_perm = (ruid == stbuf.st_uid); in lookup_perms()
218 struct stat stbuf; in get_conf_data() local
226 else if (fstat(fd, &stbuf) == -1) in get_conf_data()
228 size = (size_t)stbuf.st_size; in get_conf_data()
229 def_src = (stbuf.st_ino == def_info.st_ino && in get_conf_data()
230 stbuf.st_dev == def_info.st_dev); in get_conf_data()
H A Dconf.c332 struct stat stbuf; in save_orig() local
335 if (stat(orig_conf, &stbuf) == 0 && stbuf.st_size) in save_orig()
433 struct stat stbuf; in write_conf() local
472 if (stat(name = default_conf, &stbuf) == -1) in write_conf()
474 else if (chmod(name = tmp_conf, stbuf.st_mode) == -1) in write_conf()
476 else if (chown(tmp_conf, stbuf.st_uid, stbuf.st_gid) == -1) in write_conf()
/illumos-gate/usr/src/ucbcmd/touch/
H A Dtouch.c43 struct stat stbuf; variable
203 if (stat(filename, &stbuf)) {
224 if (stat(filename, &stbuf)) {
236 timestruc_to_timeval(&stbuf.st_mtim, times + 1);
238 timestruc_to_timeval(&stbuf.st_atim, times);
262 return (oldtouch(filename, &stbuf));
/illumos-gate/usr/src/cmd/cron/
H A Datq.c227 struct stat stbuf; /* buffer for file stats */ in countfiles() local
237 if ((stat(queue[i]->d_name, &stbuf)) < 0) { in countfiles()
244 if (*ptr == stbuf.st_uid) in countfiles()
266 struct stat stbuf; /* buffer for file stats */ in printqueue() local
290 if ((stat(queue[i]->d_name, &stbuf)) < 0) { in printqueue()
303 if (*ptr == stbuf.st_uid) in printqueue()
312 printf("%-10s ", getname(stbuf.st_uid)); in printqueue()
/illumos-gate/usr/src/cmd/svc/startd/
H A Dutmpx.c359 struct stat stbuf; in utmpx_write_boottime() local
372 if (stat(WTMPX_FILE, &stbuf) == 0 && stbuf.st_size != 0) { in utmpx_write_boottime()
373 tstamp = (stbuf.st_atime >= stbuf.st_mtime) ? in utmpx_write_boottime()
374 stbuf.st_atime : stbuf.st_mtime; in utmpx_write_boottime()
/illumos-gate/usr/src/cmd/chown/
H A Dchown.c63 static struct stat stbuf; variable
253 if (lstat(argv[c], &stbuf) < 0) { in main()
257 if (rflag && ((stbuf.st_mode & S_IFMT) == S_IFLNK)) { in main()
322 } else if (rflag && ((stbuf.st_mode & S_IFMT) == S_IFDIR)) { in main()
327 if (add_tnode(&tree, stbuf.st_dev, in main()
328 stbuf.st_ino) == 1) { in main()
/illumos-gate/usr/src/uts/i86pc/os/
H A Dsmb_dev.c67 caddr_t stbuf, bios, p, q; in smbios_open() local
190 stbuf = smb_alloc(smbe_stlen); in smbios_open()
191 bcopy(bios, stbuf, smbe_stlen); in smbios_open()
193 shp = smbios_bufopen(ep, stbuf, smbe_stlen, version, flags, &err); in smbios_open()
196 smb_free(stbuf, smbe_stlen); in smbios_open()
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/ftp/
H A Dauth.c88 char stbuf[FTPBUFSIZ]; in do_auth() local
123 (void) snprintf(stbuf, FTPBUFSIZ, "%s@%s", in do_auth()
127 "Trying to authenticate to <%s>\n", stbuf); in do_auth()
129 send_tok.value = stbuf; in do_auth()
130 send_tok.length = strlen(stbuf) + 1; in do_auth()
136 (void) fprintf(stderr, "name parsed <%s>\n", stbuf); in do_auth()

12345