Searched refs:fd (Results 26 - 50 of 835) sorted by relevance

1234567891011>>

/osnet-11/usr/src/lib/libast/common/comp/
H A Dcloselog.c40 if (log.fd >= 0)
42 close(log.fd);
43 log.fd = -1;
H A Dreadlink.c43 int fd;
48 if ((fd = open(path, O_RDONLY)) < 0)
50 if (read(fd, buf, sizeof(FAKELINK_MAGIC)) == sizeof(FAKELINK_MAGIC) && !strcmp(buf, FAKELINK_MAGIC) && (n = read(fd, buf, siz)) > 0 && !buf[n - 1])
52 close(fd);
55 close(fd);
H A Dsymlink.c46 int fd;
48 if ((fd = open(b, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0)
51 n = (write(fd, FAKELINK_MAGIC, sizeof(FAKELINK_MAGIC)) != sizeof(FAKELINK_MAGIC) || write(fd, a, n) != n) ? -1 : 0;
52 close(fd);
/osnet-11/usr/src/lib/libc/port/gen/
H A Dtcgetpgrp.c40 tcgetpgrp(int fd) argument
44 if (tcgetsid(fd) < 0 || ioctl(fd, TIOCGPGRP, &pgrp) < 0)
H A Dtcsetpgrp.c40 tcsetpgrp(int fd, pid_t pgrp) argument
42 if (tcgetsid(fd) < 0)
44 return (ioctl(fd, TIOCSPGRP, &pgrp));
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...]
/osnet-11/usr/src/lib/libresolv2/common/bsd/
H A Dftruncate.c32 __ftruncate(int fd, long wantsize) { argument
36 if ((cursize = lseek(fd, 0L, 2)) == -1)
41 if (lseek(fd, wantsize - 1, 0) == -1 ||
42 write(fd, "", 1) == -1) {
56 return (fcntl(fd, F_FREESP, &fl));
H A Dreadv.c19 __readv(fd, vp, vpcount)
20 int fd;
27 int bytes = read(fd, vp->iov_base, vp->iov_len);
/osnet-11/usr/src/lib/libnsl/common/
H A Ddaemon_utils.c64 int fd, err; local
67 if ((fd = open_daemon_lock(name, O_RDONLY)) == -1) {
78 err = fcntl(fd, F_GETLK, &lock);
79 (void) close(fd);
91 int fd; local
124 if ((fd = open(lock_file, mode, 0644)) == -1)
128 (void) fchmod(fd, 0644);
130 return (fd);
141 int fd; local
149 if ((fd
177 int fd = open_daemon_lock(name, O_CREAT); local
[all...]
/osnet-11/usr/src/lib/libast/common/vec/
H A Dvecfile.c44 int fd; local
48 if ((fd = open(file, O_RDONLY)) >= 0)
50 if (!fstat(fd, &st) && S_ISREG(st.st_mode) && (n = st.st_size) > 0 && (buf = newof(0, char, n + 1, 0)))
52 if (read(fd, buf, n) == n)
59 close(fd);
/osnet-11/usr/src/lib/libc/port/sys/
H A Dopen.c44 static int xpg4_fixup(int fd);
45 static void push_module(int fd);
46 static int isptsfd(int fd);
52 int fd = syscall(SYS_openat, dfd, path, oflag, mode); local
53 return (xpg4_fixup(fd));
67 int fd = syscall(SYS_openat64, dfd, path, oflag, mode); local
68 return (xpg4_fixup(fd));
86 xpg4_fixup(int fd) argument
88 if (libc__xpg4 != 0 && fd >= 0 && isptsfd(fd))
98 isptsfd(int fd) argument
152 push_module(int fd) argument
[all...]
/osnet-11/usr/src/lib/libc/port/stdio/
H A D_endopen.c58 int oflag, fd, fflag; local
90 fd = open64(name, oflag, 0666);
92 fd = open(name, oflag, 0666);
94 if (fd < 0)
99 iop->_file = fd;
102 if (fd <= _FILE_FD_MAX) {
103 SET_FILE(iop, fd);
104 } else if (_file_set(iop, fd, type) != 0) {
106 (void) close(fd);
113 if (lseek64(fd, (off64_
[all...]
H A Dfdopen.c56 fdopen(int fd, const char *type) /* associate file desc. with stream */ argument
64 if (fcntl(fd, F_GETFD) == -1)
81 (void) lseek64(fd, (off64_t)0, SEEK_END);
94 iop->_file = fd;
96 if (fd <= _FILE_FD_MAX) {
97 SET_FILE(iop, fd);
98 } else if (_file_set(iop, fd, type) != 0) {
/osnet-11/usr/src/lib/gss_mechs/mech_krb5/krb5/os/
H A Dkrbfileio.c58 int fd; local
63 fd = THREEPARAMOPEN(pathname, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0600);
71 if (fd > -1) {
78 fchown(fd, uid, gid);
80 fchmod(fd, 0600);
84 if (fd > -1) {
85 close(fd);
/osnet-11/usr/src/lib/libast/common/port/
H A Dastwinsize.c72 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...]
/osnet-11/usr/src/lib/lvm/libmeta/common/
H A Dmeta_devstamp.c43 int fd; local
52 if ((fd = open(np->rname, O_RDONLY | O_NDELAY, 0)) < 0)
56 if (meta_getvtoc(fd, np->cname, &vtocbuf, &partno, ep) == -1) {
57 (void) close(fd);
62 (void) close(fd); /* sd/ssd bug */
82 int fd; local
92 if ((fd = open(np->rname, O_RDWR | O_NDELAY, 0)) < 0)
95 if (meta_getvtoc(fd, np->cname, &vtocbuf, &partno, ep) == -1) {
96 (void) close(fd);
105 if (meta_setvtoc(fd, n
[all...]
/osnet-11/usr/src/lib/libproc/common/
H A Dproc_get_info.c55 int fd; local
62 if ((fd = open(fname, O_RDONLY)) >= 0) {
63 if (read(fd, credp, size) >= minsize)
65 (void) close(fd);
77 int fd; local
83 if ((fd = open(fname, O_RDONLY)) >= 0) {
84 if (fstat(fd, &statb) != 0 ||
86 read(fd, rv, statb.st_size) != statb.st_size) {
90 (void) close(fd);
106 int fd; local
139 int fd; local
156 int fd; local
179 int fd; local
[all...]
/osnet-11/usr/src/lib/libipmp/common/
H A Dipmp_mpathd.c54 int fd; local
60 fd = socket(AF_INET, SOCK_STREAM, 0);
61 if (fd == -1)
71 (void) setsockopt(fd, IPPROTO_TCP, TCP_ANONPRIVBIND, &on, sizeof (on));
81 if (bind(fd, (struct sockaddr *)&sin, sizeof (sin)) == -1)
90 if (connect(fd, (struct sockaddr *)&sin, sizeof (sin)) == -1) {
92 (void) close(fd);
101 flags = fcntl(fd, F_GETFL, 0);
103 (void) fcntl(fd, F_SETFL, flags | O_NONBLOCK);
105 *fdp = fd;
121 ipmp_readtlv(int fd, ipmp_infotype_t *typep, size_t *lenp, void **valuep, const struct timeval *endtp) argument
162 ipmp_write(int fd, const void *buffer, size_t buflen) argument
187 ipmp_writetlv(int fd, ipmp_infotype_t type, size_t len, void *value) argument
208 ipmp_read(int fd, void *buffer, size_t buflen, const struct timeval *endtp) argument
[all...]
/osnet-11/usr/src/cmd/perl/5.8.4/distrib/ext/IO/
H A Dpoll.c65 int fd = fds[i].fd; local
69 if(fd < 0 || FD_ISSET(fd, &ifd))
72 if(fd > n)
73 n = fd;
76 FD_SET(fd, &rfd);
79 FD_SET(fd, &wfd);
82 FD_SET(fd, &efd);
98 if((fstat(fds[i].fd,
112 int fd = fds[i].fd; local
[all...]
/osnet-11/usr/src/lib/libcontract/common/
H A Dlibcontract_priv.c49 close_on_exec(int fd) argument
51 int flags = fcntl(fd, F_GETFD, 0);
52 if ((flags != -1) && (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) != -1))
84 int n, fd; local
97 fd = open64(path, oflag);
98 if (fd != -1) {
99 if (close_on_exec(fd) == -1) {
101 (void) close(fd);
106 return (fd);
112 int fd, er local
127 int fd; local
184 int fd; local
[all...]
/osnet-11/usr/src/lib/libshell/common/include/
H A Dterminal.h73 # define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
75 # define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
106 # define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
107 # define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
125 # define tcgetattr(fd,tty) ioctl(fd, TIOCGET
[all...]
/osnet-11/usr/src/lib/libnsl/nsl/
H A Dt_close.c42 _tx_close(int fd, int api_semantics) argument
47 if (_t_checkfd(fd, 0, api_semantics) == NULL)
52 if (_t_delete_tilink(fd) < 0) {
64 (void) close(fd);
/osnet-11/usr/src/lib/libnsl/rpc/
H A Dcan_use_af.c49 int fd; local
51 if ((fd = open("/dev/udp", O_RDONLY)) < 0) {
56 if (ioctl(fd, SIOCGLIFNUM, &lifn, sizeof (lifn)) < 0) {
60 (void) close(fd);
/osnet-11/usr/src/lib/libparted/common/lib/
H A Dsafe-read.h29 extern size_t safe_read (int fd, void *buf, size_t count);
/osnet-11/usr/src/cmd/sendmail/db/os/
H A Dos_seek.c31 __os_seek(fd, pgsize, pageno, relative, isrewind, whence)
32 int fd;
42 ret = __db_jump.j_seek(fd,
49 ret = lseek(fd, offset, whence);

Completed in 1825 milliseconds

1234567891011>>