Searched defs:fd (Results 176 - 200 of 1651) sorted by relevance

1234567891011>>

/illumos-gate/usr/src/lib/libbc/libc/sys/sys5/
H A Dreadv.c43 readv(int fd, struct iovec *iov, int iovcnt) argument
45 return (bc_readv(fd, iov, iovcnt));
49 bc_readv(int fd, struct iovec *iov, int iovcnt) argument
55 if (fd_get(fd) != -1) {
66 if ((ret = _read(fd, nbuf, size)) == -1) {
82 return (_readv(fd, iov, iovcnt));
H A Dwrite.c41 write(int fd, char *buf, int size) argument
43 return (bc_write(fd, buf, size));
47 bc_write(int fd, char *buf, int size) argument
53 if (fd_get(fd) != -1) {
66 if ((ret = _write(fd, nbuf, ret)) == -1) {
78 return (_write(fd, buf, size));
H A Dwritev.c42 writev(int fd, struct iovec *iov, int iovcnt) argument
44 return (bc_writev(fd, iov, iovcnt));
48 bc_writev(int fd, struct iovec *iov, int iovcnt) argument
55 if (fd_get(fd) != -1) {
70 if ((ret = _write(fd, nbuf, ret)) == -1) {
84 return (_writev(fd, iov, iovcnt));
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dattropen.c53 int fd; local
60 if ((fd = open64(file, O_RDONLY|O_NONBLOCK)) == -1) {
65 if ((attrfd = openat64(fd, attr, oflag | O_XATTR,
68 (void) close(fd);
74 (void) close(fd);
84 int fd; local
91 if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
96 if ((attrfd = openat(fd, attr, oflag | O_XATTR,
99 (void) close(fd);
105 (void) close(fd);
[all...]
H A Dgetauxv.c64 int fd; local
66 if ((fd = open("/proc/self/auxv", O_RDONLY)) != -1 &&
67 fstat(fd, &statb) != -1)
72 i = read(fd, buf, statb.st_size);
82 if (fd != -1)
83 (void) close(fd);
H A Dmkstemp.c66 int fd; local
96 if ((fd = open64(as, O_CREAT|O_EXCL|O_RDWR|flags,
98 return (fd);
101 if ((fd = open(as, O_CREAT|O_EXCL|O_RDWR|flags,
103 return (fd);
H A Dtruncate.c78 int fd; local
85 if ((fd = open(path, O_WRONLY)) == -1 || ftruncate(fd, len) == -1)
87 if (fd >= 0)
88 (void) close(fd);
/illumos-gate/usr/src/lib/libc/port/stdio/
H A D_endopen.c58 int oflag, fd, fflag, eflag, plusflag, xflag; local
114 fd = open64(name, oflag, 0666);
116 fd = open(name, oflag, 0666);
118 if (fd < 0)
123 iop->_file = fd;
126 if (fd <= _FILE_FD_MAX) {
127 SET_FILE(iop, fd);
128 } else if (_file_set(iop, fd, type) != 0) {
130 (void) close(fd);
137 if (lseek64(fd, (off64_
[all...]
H A Dfopen.c83 int oflag, nflag, fd, accmode; local
109 fd = FILENO(iop);
116 if ((oflag = fcntl(fd, F_GETFL)) == -1)
137 (void) close(fd);
173 * Change mode of underlying fd as much as possible without closing
177 (void) ftruncate64(fd, (off64_t)0);
179 if (fcntl(fd, F_SETFL, nflag) == -1)
183 (void) lseek64(fd, (off64_t)0, SEEK_SET);
189 (void) close(fd);
H A Dfputs.c121 int fd = GET_FD(iop); local
123 while ((num_wrote = write(fd, ptr, (size_t)count)) != count) {
/illumos-gate/usr/src/lib/libc/port/sys/
H A Dchown.c36 fchownat(int fd, const char *name, uid_t uid, gid_t gid, int flags) argument
38 return (syscall(SYS_fchownat, fd, name, uid, gid, flags));
H A Dnfssys.c70 nfssvc(int fd) argument
74 nsa.fd = fd;
H A Dsidsys.c58 __idmap_reg(int fd) argument
60 return (syscall(SYS_sidsys, SIDSYS_IDMAP_REG, fd));
64 __idmap_unreg(int fd) argument
66 return (syscall(SYS_sidsys, SIDSYS_IDMAP_UNREG, fd));
H A Dutimesys.c36 futimens(int fd, const timespec_t times[2]) argument
38 return (syscall(SYS_utimesys, 0, fd, times));
42 utimensat(int fd, const char *path, const timespec_t times[2], int flag) argument
44 return (syscall(SYS_utimesys, 1, fd, path, times, flag));
94 futimesat(int fd, const char *path, const struct timeval times[2]) argument
114 return (futimens(fd, tsp));
116 return (utimensat(fd, path, tsp, 0));
/illumos-gate/usr/src/lib/libcmd/common/
H A Dmktemp.c71 int fd; local
75 int* fdp = &fd;
H A Dpids.c62 int fd; local
73 for (fd = 0; fd < 3; fd++)
74 if ((tid = tcgetpgrp(fd)) >= 0)
/illumos-gate/usr/src/lib/libinetutil/common/
H A Difaddrlist.c63 int fd; local
72 if ((fd = socket(family, SOCK_DGRAM, 0)) == -1) {
83 if (ioctl(fd, SIOCGLIFNUM, &lifn) == -1) {
102 if (ioctl(fd, SIOCGLIFCONF, &lifc) == -1) {
134 if (ioctl(fd, SIOCGLIFFLAGS, lifrp) == -1) {
142 if (ioctl(fd, SIOCGLIFINDEX, lifrp) == -1) {
150 if (ioctl(fd, SIOCGLIFADDR, lifrp) == -1) {
168 (void) close(fd);
188 (void) close(fd);
/illumos-gate/usr/src/lib/libmail/common/
H A Dnotifyu.c70 int fd; local
84 if ((fd = open(dev, O_WRONLY|O_NOCTTY)) == -1) {
89 if (!isatty(fd)) {
96 (void) close(fd);
100 (void) close(fd);
/illumos-gate/usr/src/lib/libmtmalloc/tests/
H A Dexhaust.c51 int fd; local
57 fd = open("/dev/zero", O_RDONLY);
59 if (fd < 0) {
66 MAP_PRIVATE, fd, 0);
68 close(fd);
/illumos-gate/usr/src/cmd/oamuser/group/
H A Ddel_group.c56 int fd; local
67 if ((fd = mkstemp(tname)) == -1)
70 if ((t_fptr = fdopen(fd, "w")) == NULL) {
71 (void) close(fd);
80 if (fchmod(fd, sbuf.st_mode) != 0 ||
81 fchown(fd, sbuf.st_uid, sbuf.st_gid) != 0) {
H A Dmod_group.c53 int fd; local
67 if ((fd = mkstemp(tname)) == -1)
70 if ((t_fptr = fdopen(fd, "w")) == NULL) {
71 (void) close(fd);
80 if (fchmod(fd, sbuf.st_mode) != 0 ||
81 fchown(fd, sbuf.st_uid, sbuf.st_gid) != 0) {
/illumos-gate/usr/src/cmd/print/conv_fix/
H A Dconv_fix.c120 int fd; local
122 fd = open(ofile, O_RDWR|O_APPEND);
123 if ((fd < 0) && (errno == ENOENT))
124 fd = open(ofile, O_RDWR|O_CREAT|O_EXCL, 0644);
126 if (fd < 0) {
132 lseek(fd, 0, SEEK_END);
134 if ((fp2 = fdopen(fd, "a")) != NULL) {
/illumos-gate/usr/src/cmd/prstat/
H A Dprfile.h41 typedef struct fd { struct
/illumos-gate/usr/src/cmd/rexd/
H A Dsharetab.c61 getshare(FILE *fd, share_t **shp) argument
79 p = fgets(line, BUFSIZ, fd);
/illumos-gate/usr/src/cmd/fm/modules/common/cpumem-retire/
H A Dcma_cache.c46 int ret, fd; local
119 fd = open(mem_cache_device, O_RDWR);
120 if (fd == -1) {
131 ret = ioctl(fd, MEM_CACHE_RETIRE, &cache_info);
137 (void) close(fd);

Completed in 155 milliseconds

1234567891011>>