/illumos-gate/usr/src/test/zfs-tests/cmd/largest_file/ |
H A D | largest_file.c | 56 int fd = 0; local 73 fd = open(testfile, O_CREAT | O_RDWR, mode); 74 if (fd < 0) { 80 llseek_ret = llseek(fd, offset, SEEK_SET); 87 write_ret = write(fd, mybuf, 1); 95 llseek_ret = llseek(fd, offset, SEEK_CUR); 102 write_ret = write(fd, mybuf, 1);
|
/illumos-gate/usr/src/test/zfs-tests/cmd/randfree_file/ |
H A D | randfree_file.c | 57 int fd, ch; local 85 if ((fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, mode)) < 0) { 89 if (write(fd, buf, filesize) < filesize) { 96 if (fcntl(fd, F_FREESP, &fl) != 0) {
|
/illumos-gate/usr/src/test/zfs-tests/cmd/readmmap/ |
H A D | readmmap.c | 56 int fd = -1, bytes, retval = 0; local 74 fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666); 75 if (fd == -1) { 81 bytes = write(fd, buf, size); 88 map = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 112 bytes = pread(fd, buf, size, 0); 129 if (fd != -1) { 130 (void) close(fd);
|
/illumos-gate/usr/src/uts/common/syscall/ |
H A D | chown.c | 58 fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag) argument 76 error = fsetattrat(fd, path, flag, &vattr); 95 fchown(int fd, uid_t uid, uid_t gid) argument 97 return (fchownat(fd, NULL, uid, gid, 0));
|
H A D | mknod.c | 59 mknodat(int fd, char *fname, mode_t fmode, dev_t dev) argument 95 if ((error = fgetstartvp(fd, fname, &startvp)) != 0)
|
/illumos-gate/usr/src/lib/krb5/ss/ |
H A D | help.c | 35 int fd, child; local 71 if ((fd = open(&buffer[0], O_RDONLY)) >= 0) goto got_it; 73 if ((fd = open(&buffer[0], O_RDONLY)) < 0) { 87 (void) dup2(fd, 0); /* put file on stdin */ 90 (void) close(fd); /* what can we do if it fails? */
|
/illumos-gate/usr/src/lib/libadm/common/ |
H A D | rdwr_vtoc.c | 81 read_vtoc(int fd, struct vtoc *vtoc) argument 88 if (ioctl(fd, DKIOCGVTOC, (caddr_t)vtoc) == -1) { 141 if (ioctl(fd, DKIOCINFO, (caddr_t)&dki_info) == -1) { 161 write_vtoc(int fd, struct vtoc *vtoc) argument 186 if (ioctl(fd, DKIOCSVTOC, (caddr_t)vtoc) == -1) { 205 read_extvtoc(int fd, struct extvtoc *extvtoc) argument 215 if (ioctl(fd, DKIOCGEXTVTOC, (caddr_t)extvtoc) == -1) { 228 if ((ret = read_vtoc(fd, oldvtocp)) < 0) 281 if (ioctl(fd, DKIOCINFO, (caddr_t)&dki_info) == -1) { 301 write_extvtoc(int fd, struc argument [all...] |
/illumos-gate/usr/src/lib/libast/common/comp/ |
H A D | mktemp.c | 82 int fd; local 84 return *temp(buf, &fd) ? fd : -1;
|
/illumos-gate/usr/src/lib/libast/common/port/ |
H A D | astwinsize.c | 72 astwinsize(int fd, register int* rows, register int* cols) argument 78 if (!ttctl(fd, TIOCGWINSZ, &ws) && ws.ws_col > 0 && ws.ws_row > 0) 89 if (!ttctl(fd, TIOCGSIZE, &ts) && ts.ts_lines > 0 && ts.ts_cols > 0) 100 if (!ttctl(fd, JWINSIZE, &ws) && ws.bytesx > 0 && ws.bytesy > 0) 124 ttctl(register int fd, int op, void* tt) argument 128 if (fd < 0) 130 for (fd = 0; fd <= 2; fd++) 131 if (!ioctl(fd, o [all...] |
/illumos-gate/usr/src/lib/libast/common/sfio/ |
H A D | _sfopen.c | 46 int fd, oldfd, oflags, sflags; local 97 while((fd = sysopenf((char*)file,oflags,SF_CREATMODE)) < 0 && errno == EINTR) 100 while((fd = sysopenf(file,oflags&O_ACCMODE)) < 0 && errno == EINTR) 102 if(fd >= 0) 104 { CLOSE(fd); /* error: file already exists */ 116 { while((fd = syscreatf(file,SF_CREATMODE)) < 0 && errno == EINTR) 120 CLOSE(fd); 121 while((fd = sysopenf(file,oflags&O_ACCMODE)) < 0 && 127 if(fd < 0) 132 if((f = sfnew(f,NIL(char*),(size_t)SF_UNBOUND,fd,sflag [all...] |
/illumos-gate/usr/src/cmd/lp/cmd/lpsched/ |
H A D | notify.c | 101 int fd; local 121 if ((fd = open_locked(file, "w", MODE_NOREAD)) >= 0) { 122 fdprintf(fd, N_Msg[0], prs->secure->req_id, prs->secure->req_id, 131 fdprintf(fd, "\nThe job title was:\t%s\n", file); 132 fdprintf(fd, " submitted by:\t%s\n", 134 fdprintf(fd, " at:\t%s\n", 139 fdprintf(fd, N_Msg[1], prs->printer->printer->name); 142 fdprintf(fd, N_Msg[2], 149 fdprintf(fd, N_Msg[3]); 151 fdprintf(fd, N_Ms 188 print_reason(int fd, int reason) argument [all...] |
/illumos-gate/usr/src/cmd/lp/lib/access/ |
H A D | dumpaccess.c | 88 int fd; local 91 if ((fd = open_locked(file, "w", MODE_READ)) < 0) 95 fdprintf (fd, "%s\n", *pl); 100 close(fd);
|
/illumos-gate/usr/src/cmd/lp/lib/forms/ |
H A D | putform.c | 53 int fd; local 93 if ((fd = open_locked(path, "w", MODE_READ)) < 0) { 99 if (wrform(name, formp, fd, 0, (int *)0) == -1) { 100 close(fd); 103 close(fd); 130 if ((fd = open_locked(path, "w", MODE_READ)) < 0) { 137 write (fd, buf, n); 139 close(fd);
|
/illumos-gate/usr/src/cmd/lp/lib/lp/ |
H A D | tx.c | 105 get_peer_label(int fd, char **slabel) argument 114 if ((fd < 0) || (slabel == NULL)) { 121 if (getpeerucred(fd, &uc) == -1) 143 fd, (*slabel ? *slabel : "NULL"), pslabel);
|
/illumos-gate/usr/src/cmd/lp/lib/msgs/ |
H A D | mconnect.c | 65 int fd; local 97 if ((fd = Open(path, O_RDWR, 0)) == -1) 98 if ((fd = Open(path, O_WRONLY, 0)) == -1) 103 if (isastream(fd) && !wronly) 111 if (ioctl(fd, I_SENDFD, fds[1]) != 0) 114 (void)_Close(fd); 116 fd = fds[0]; 129 md->readfd = fd; 133 md->writefd = fd; 174 int fd; local [all...] |
/illumos-gate/usr/src/cmd/lp/lib/papi/ |
H A D | papi_impl.h | 73 int fd; member in struct:__anon815
|
/illumos-gate/usr/src/cmd/lp/lib/printers/ |
H A D | getpentry.c | 59 int fd; local 105 if ((fd = open_locked(path, "r", 0)) < 0) { 127 while (fdgets(buf, BUFSIZ, fd) != NULL) { 163 close(fd); 167 close(fd);
|
/illumos-gate/usr/src/cmd/lp/lib/secure/ |
H A D | secure.c | 54 int fd; local 66 if ((fd = open_locked(path, "r", MODE_NOREAD)) < 0) { 78 fld < SC_MAX && fdgets(buf, BUFSIZ, fd); 117 close(fd); 121 close(fd); 151 int fd; local 162 if ((fd = open_locked(path, "w", MODE_NOREAD)) < 0) { 179 (void)fdprintf(fd, "%s\n", secbufp->req_id); 183 (void)fdprintf(fd, "%u\n", secbufp->uid); 187 (void)fdprintf(fd, " [all...] |
/illumos-gate/usr/src/cmd/lp/lib/users/ |
H A D | usermgmt.c | 46 int fd; local 60 if ((fd = open_locked(Lp_Users, "w", LPU_MODE)) < 0) 62 output_tbl(fd, ppri_tbl); 63 close(fd); 99 int fd; local 111 if ((fd = open_locked(Lp_Users, "w", LPU_MODE)) < 0) 114 output_tbl(fd, ppri_tbl); 115 close(fd);
|
/illumos-gate/usr/src/cmd/smbsrv/fksmbd/ |
H A D | fksmbd_ksock.c | 32 ksocket_bind_helper(int fd, struct sockaddr *addr, uint_t addrlen) argument 89 (void) dup2(fd, 0);
|
/illumos-gate/usr/src/cmd/make/lib/makestate/ |
H A D | lock.c | 80 int fd; local 120 fd = creat(tmpname, 0666); 121 if (fd != -1) { 122 (void) close(fd);
|
/illumos-gate/usr/src/lib/libc/port/sys/ |
H A D | timerfd.c | 26 int fd; local 39 if ((fd = open("/dev/timerfd", oflags)) < 0) 42 if (ioctl(fd, TIMERFDIOC_CREATE, clockid) != 0) { 43 (void) close(fd); 47 return (fd); 51 timerfd_settime(int fd, int flags, const struct itimerspec *new_value, argument 66 rval = ioctl(fd, TIMERFDIOC_SETTIME, &st); 81 timerfd_gettime(int fd, struct itimerspec *curr_value) argument 83 int rval = ioctl(fd, TIMERFDIOC_GETTIME, curr_value);
|
/illumos-gate/usr/src/test/zfs-tests/cmd/mkfiles/ |
H A D | mkfiles.c | 53 int fd; local 55 if ((fd = open(buf, O_CREAT | O_EXCL, O_RDWR)) == -1) { 60 (void) close(fd);
|
/illumos-gate/usr/src/tools/btxld/ |
H A D | version.c | 48 int fd; local 59 fd = open(file, O_RDONLY); 60 if (fd == -1) { 64 if (fstat(fd, &sb) == -1) { 66 close(fd); 77 close(fd); 85 ret = read(fd, buf, sb.st_size); 89 close(fd); 92 close(fd); 117 fd [all...] |
/illumos-gate/usr/src/boot/lib/libstand/ |
H A D | gets.c | 86 fgetstr(char *buf, int size, int fd) argument 94 err = read(fd, &c, sizeof(c));
|