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

1234567891011>>

/illumos-gate/usr/src/lib/libc/port/gen/
H A Dopendir.c51 int fd; local
54 if ((fd = openat(AT_FDCWD, filename,
57 if ((dirp = fdopendir(fd)) == NULL)
58 (void) close(fd);
/illumos-gate/usr/src/cmd/sgs/0@0/common/
H A D0@0.c46 int fd; local
48 if ((fd = open("/dev/zero", O_RDWR)) < 0)
50 (void) mmap(0, 1, PROT_READ, MAP_PRIVATE|MAP_FIXED, fd, 0);
51 (void) close(fd);
/illumos-gate/usr/src/lib/libbc/csu/common/
H A Dalloc_pbuf.c36 int fd; local
38 if((fd = open("/dev/zero",O_RDONLY)) == -1 ) {
41 buf = (char*) mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
42 close(fd);
/illumos-gate/usr/src/cmd/lp/lib/printers/
H A Ddefault.c56 int fd; local
61 if ((fd = open_locked(Lp_Default, "w", MODE_READ)) < 0)
64 fdprintf(fd, "%s\n", dflt);
66 close(fd);
/illumos-gate/usr/src/boot/lib/libstand/
H A Dfstat.c40 fstat(fd, sb)
41 int fd;
44 struct open_file *f = &files[fd];
46 if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
/illumos-gate/usr/src/cmd/ipf/lib/common/
H A Dkvatoname.c12 int fd; local
16 fd = -1;
19 fd = open(IPL_NAME, O_RDONLY);
20 if (fd == -1)
23 (void) (*iocfunc)(fd, SIOCFUNCL, &res);
24 if (fd >= 0)
25 close(fd);
H A Dnametokva.c11 int fd; local
15 fd = -1;
18 fd = open(IPL_NAME, O_RDONLY);
19 if (fd == -1)
22 (void) (*iocfunc)(fd, SIOCFUNCL, &res);
23 if (fd >= 0)
24 close(fd);
/illumos-gate/usr/src/lib/libc/port/sys/
H A Dsignalfd.c23 signalfd(int fd, const sigset_t *mask, int flags) argument
25 int origfd = fd;
27 if (fd == -1) {
41 if ((fd = open("/dev/signalfd", oflags)) < 0)
45 if (ioctl(fd, SIGNALFDIOC_MASK, mask) != 0) {
48 (void) close(fd);
53 * it's because it's not a valid fd or not a sigfd. ioctl
59 return (fd);
H A Dopen.c45 static int xpg4_fixup(int fd);
46 static void push_module(int fd);
47 static int isptsfd(int fd);
53 int fd = syscall(SYS_openat, dfd, path, oflag, mode); local
54 return (xpg4_fixup(fd));
61 int fd = syscall(SYS_open, path, oflag, mode); local
62 return (xpg4_fixup(fd));
73 int fd = syscall(SYS_openat64, dfd, path, oflag, mode); local
74 return (xpg4_fixup(fd));
81 int fd local
97 xpg4_fixup(int fd) argument
109 isptsfd(int fd) argument
163 push_module(int fd) argument
[all...]
/illumos-gate/usr/src/lib/libbc/libc/sys/4.2/
H A Dtruncate.c39 int fd, ret = 0; local
47 if ((fd = open(path, O_WRONLY)) == -1) {
51 if (ftruncate(fd, length) == -1) {
52 close(fd);
55 close(fd);
/illumos-gate/usr/src/lib/libbc/libc/sys/sys5/
H A Dtruncate.c38 int fd, ret = 0; local
44 if ((fd = open(path, O_WRONLY)) == -1) {
48 if (ftruncate(fd, length) == -1) {
49 close(fd);
52 close(fd);
/illumos-gate/usr/src/cmd/svc/startd/
H A Dproc.c44 int fd; local
48 fd = open("/proc/self/psinfo", O_RDONLY);
49 if (fd < 0)
52 bytes = read(fd, &psinfo, sizeof (psinfo));
58 (void) close(fd);
/illumos-gate/usr/src/cmd/lp/lib/class/
H A Dputclass.c50 int fd; local
69 if ((fd = open_locked(file, "w", MODE_READ)) < 0) {
76 fdprintlist(fd, clsbufp->members);
78 close(fd);
81 close(fd);
/illumos-gate/usr/src/lib/libnsctl/common/
H A Dcache.c60 nsc_fd_t *fd; local
67 if (!(fd = (nsc_fd_t *)calloc(1, sizeof (nsc_fd_t))))
75 fd->sf_flag = flag;
76 fd->sf_fmode = mode;
78 strcpy(fd->sf_path, path);
80 if (!_nsc_open_path(fd)) {
81 free(fd);
85 if (ckdchk && !_nsc_open_check(fd)) {
86 (void) nsc_close(fd);
90 return (fd);
100 nsc_fd_t *fd; local
268 nsc_partsize(nsc_fd_t *fd, nsc_size_t *rvp) argument
306 int fd, rc, save_errno; local
[all...]
/illumos-gate/usr/src/lib/libsqlite/tool/
H A Dspeedtest.tcl18 set fd [open $sqlfile r]
19 set sql [string trim [read $fd [file size $sqlfile]]]
20 close $fd
78 set fd [open clear.sql w]
79 puts $fd {
83 close $fd
86 set fd [open 2kinit.sql w]
87 puts $fd {
91 close $fd
94 set fd [ope
[all...]
H A Dspeedtest2.tcl18 set fd [open $sqlfile r]
19 set sql [string trim [read $fd [file size $sqlfile]]]
20 close $fd
70 set fd [open clear.sql w]
71 puts $fd {
75 close $fd
78 set fd [open 2kinit.sql w]
79 puts $fd {
83 close $fd
86 set fd [ope
[all...]
/illumos-gate/usr/src/lib/libwanbootutil/common/
H A Dwbio.c35 * Write `buflen' bytes from `buffer' to the file represented by `fd'.
39 wbio_nwrite(int fd, const void *buffer, size_t buflen) argument
46 nbytes = write(fd, &buf[nwritten], buflen - nwritten);
55 * Read `buflen' bytes into `buffer' from the file represented by `fd'.
59 wbio_nread(int fd, void *buffer, size_t buflen) argument
66 nbytes = read(fd, &buf[nread], buflen - nread);
81 int fd; local
83 if ((fd = open("/dev/urandom", O_RDONLY)) == -1) {
87 if (wbio_nread(fd, buffer, buflen) != 0) {
88 (void) close(fd);
[all...]
/illumos-gate/usr/src/cmd/ttymon/
H A Dtmlock.c78 * tm_lock(fd) - set advisory lock on the device
81 tm_lock(int fd) argument
84 return (fd_mklock(fd));
91 tm_checklock(int fd) argument
94 return (fd_cklock(fd));
98 * check_session(fd) - check if a session established on fd
103 check_session(int fd) argument
107 if (ioctl(fd, TIOCGSID, &sid) == -1)
/illumos-gate/usr/src/cmd/lp/lib/forms/
H A Dwrform.c60 wrform(char *name, FORM *formp, int fd, int (*error_handler)( int , int , int ), argument
77 print_sdn(fd, HEAD, formp->plen);
81 print_sdn(fd, HEAD, formp->pwid);
85 print_sdn(fd, HEAD, formp->lpi);
90 print_str(fd, HEAD, NAME_COMPRESSED);
92 print_sdn(fd, HEAD, formp->cpi);
96 fdprintf(fd, "%s %d\n", HEAD, formp->np);
100 fdprintf(fd, "%s %s", HEAD, formp->chset);
102 fdprintf(fd, ",%s", MANSTR);
103 fdprintf(fd, "\
189 print_sdn(int fd, char *head, SCALED sdn) argument
201 print_str(int fd, char *head, char *str) argument
[all...]
/illumos-gate/usr/src/cmd/format/
H A Dadd_definition.c62 static void add_disktype(FILE *fd, struct disk_info *disk_info);
63 static void add_partition(FILE *fd, struct disk_info *,
65 static int add_entry(int col, FILE *fd, char *format, ...);
81 FILE *fd; local
147 if ((fd = fopen(filename, "a")) == NULL) {
158 (void) fprintf(fd, "#\n# New disk/partition type ");
160 (void) fprintf(fd, "#\n# New disk type ");
162 (void) fprintf(fd, "#\n# New partition type ");
165 (void) fprintf(fd, " saved on %s#\n", ctime(&clock));
170 add_disktype(fd, cur_dis
374 add_entry(int col, FILE *fd, char *format, ...) argument
[all...]
/illumos-gate/usr/src/lib/libefi/common/
H A Dllib-lefi37 int efi_alloc_and_init(int fd, uint32_t nparts, struct dk_gpt **vtoc);
38 int efi_alloc_and_read(int fd, struct dk_gpt **vtoc);
39 int efi_write(int fd, struct dk_gpt *vtoc);
41 int efi_use_whole_disk(int fd);
/illumos-gate/usr/src/lib/libc/port/rt/
H A Dshm.c41 int fd; local
51 fd = __pos4obj_open(path, SHM_DATA_TYPE, oflag, mode, &crflag);
53 if (fd < 0) {
58 if ((flags = fcntl(fd, F_GETFD)) < 0 ||
59 fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
61 (void) __close_nc(fd);
67 (void) __close_nc(fd);
71 return (fd);
/illumos-gate/usr/src/cmd/dcs/sparc/sun4u/
H A Drdr_messages.h79 int rdr_setsockopt(int fd, int level, int optname, const void *optval,
86 int rdr_init(int fd, struct sockaddr *addr, int *opts, int num_opts, int blog);
88 int rdr_connect_clnt(int fd, struct sockaddr *addr);
90 int rdr_connect_srv(int fd);
92 int rdr_reject(int fd);
94 int rdr_close(int fd);
96 int rdr_snd_msg(int fd, rdr_msg_hdr_t *hdr, cfga_params_t *param, int timeout);
98 int rdr_rcv_msg(int fd, rdr_msg_hdr_t *hdr, cfga_params_t *param, int timeout);
/illumos-gate/usr/src/cmd/sgs/libelf/common/
H A Doutput.c50 _elf_outmap(int fd, size_t sz, unsigned int *pflag) argument
59 if ((!*pflag) && (ftruncate(fd, (off_t)sz) == 0) &&
61 MAP_SHARED, fd, (off_t)0)) != (char *)-1) {
80 _elf_outsync(int fd, char *p, size_t sz, unsigned int flag) argument
85 if ((fd = msync(p, sz, MS_ASYNC)) == -1)
88 if (fd == 0)
93 if ((lseek(fd, 0L, SEEK_SET) == 0) &&
94 (write(fd, p, sz) == sz)) {
/illumos-gate/usr/src/lib/libast/common/comp/
H A Dsetsid.c44 int fd;
63 if ((fd = open("/dev/tty", O_RDONLY)) >= 0)
65 ioctl(fd, TIOCNOTTY, 0);
66 close(fd);

Completed in 175 milliseconds

1234567891011>>