/osnet-11/usr/src/cmd/sendmail/src/ |
H A D | tls.c | 146 int fd; local 157 if ((fd = safeopen(randfile, O_RDONLY, 0, sff)) >= 0) 159 if (fstat(fd, &st) < 0) 218 (void) close(fd);
|
/osnet-11/usr/src/lib/libast/common/comp/ |
H A D | omitted.c | 214 int fd; local 226 if ((fd = sysopen(path, O_RDONLY, 0)) >= 0) 234 r = (m = sysread(fd, buf, n)) >= 2 && (buf[1] == 0x5a && (buf[0] == 0x4c || buf[0] == 0x4d) || ux && buf[0] == '#' && buf[1] == '!' && (*ux = 1) && !(ux = 0)) ? 0 : -1; 235 sysclose(fd); 692 * dup*() and exec*() fd's will not be intercepted 705 close(int fd) argument 712 if (fd >= 0 && fd < elementsof(exe) && exe[fd]) 714 r = exe[fd] 734 write(int fd, const void* buf, size_t n) argument 746 int fd; local [all...] |
/osnet-11/usr/src/lib/libast/common/vmalloc/ |
H A D | malloc.c | 118 ** Output files are created if they don't exist. &n and /dev/fd/n name 834 int fd; local 862 if (*file == '&' && *(file += 1) || strncmp(file, "/dev/fd/", 8) == 0 && *(file += 8)) 863 fd = dup((int)atou(&file)); 866 fd = open(file, O_WRONLY|O_CREAT|O_TRUNC, CREAT_MODE); 868 fd = creat(file, CREAT_MODE); 874 if (fd >= 0) 875 fcntl(fd, F_SETFD, FD_CLOEXEC); 878 return fd; 909 int fd; local [all...] |
H A D | vmbest.c | 1233 int fd; member in struct:_mmapdisc_s 1388 if(mmdc->fd < 0) 1389 { int fd; local 1390 if(mmdc->fd != -1) 1392 if((fd = open("/dev/zero", O_RDONLY)) < 0 ) 1393 { mmdc->fd = -2; 1396 if(fd >= OPEN_PRIVATE || (mmdc->fd = dup2(fd,OPEN_PRIVATE)) < 0 ) 1397 mmdc->fd [all...] |
H A D | vmprofile.c | 354 int vmprofile(Vmalloc_t* vm, int fd) argument 356 int vmprofile(vm, fd) 358 int fd; 367 #define CHKBUF() (bufp >= endbuf ? (write(fd,buf,bufp-buf), bufp=buf) : bufp) 368 #define FLSBUF() (bufp > buf ? write(fd,buf,bufp-buf) : 0) 370 if(fd < 0)
|
/osnet-11/usr/src/lib/libc/inc/ |
H A D | asyncio.h | 75 int fd; member in struct:aio_args 188 * Before a kaio() system call, the fd will be checked 193 * will we stop submitting kaio() calls for that fd. 194 * If the fd is outside the array bounds, we will allow the kaio() 197 * The only way that an fd entry can go from ENOTSUP to supported 198 * is if that fd is freed up by a close(), and close will clear 199 * the entry for that fd. 201 * Each fd gets a bit in the array _kaio_supported[].
|
/osnet-11/usr/src/lib/libc/port/aio/ |
H A D | posix_aio.c | 432 * checks because it is not mandatory to have a valid fd 648 * mandatory to have a valid fd set in the 867 aio_cancel(int fd, aiocb_t *aiocbp) argument 875 if (fstat(fd, &buf) < 0) 879 if (fd != aiocbp->aio_fildes) { 903 return ((int)_kaio(AIOCANCEL, fd, aiocbp)); 906 return (aiocancel_all(fd)); 1545 * mandatory to have a valid fd set in the 1743 aio_cancel64(int fd, aiocb64_t *aiocbp) argument 1751 if (fstat64(fd, [all...] |
/osnet-11/usr/src/lib/libc/port/gen/ |
H A D | nftw.c | 135 DIR *fd; member in struct:Save 307 this->fd = 0; 337 if ((this->fd = (*vp->opendirf)(comp)) == 0) { 339 (this->fd = (*vp->opendirf)(comp)) != 0) { 342 * are OPEN_MAX fd in the calling 344 * fd, and another opendirf doesn't 439 (fstat(dirfd(this->fd), &statb2) < 0 || 447 if ((cdval = fchdir(dirfd(this->fd))) >= 0) { 486 while (dir = readdir(this->fd)) { 542 if (this->fd 755 int fd; local 778 int fd; local 811 int fd, cfd; local [all...] |
H A D | ttyname.c | 635 int fd, state; local 645 if ((fd = open(TTYSRCH, 0)) < 0) 648 if (fstat64(fd, &sb) < 0) { 649 (void) close(fd); 662 (void) close(fd); 668 size = read(fd, dir_buf, sz); 670 (void) close(fd);
|
/osnet-11/usr/src/lib/libc/port/i18n/ |
H A D | gettext.h | 110 iconv_t fd; /* iconv descriptor */ member in struct:__anon1418
|
H A D | gettext_real.c | 1069 int fd; local 1108 fd = nls_safe_open(mp->msgfile, &statbuf, &mp->trusted, !mp->nlsp); 1109 if ((fd == -1) || (statbuf.st_size > LONG_MAX)) { 1110 if (fd != -1) 1111 (void) close(fd); 1117 mp->addr = mmap(NULL, mp->fsz, PROT_READ, MAP_SHARED, fd, 0); 1118 (void) close(fd);
|
/osnet-11/usr/src/lib/libc/port/stdio/ |
H A D | flush.c | 548 int fd = GET_FD(iop); local 549 while ((num_wrote = write(fd, base, (size_t)n)) != n) { 772 /* flush buffer, close fd but keep the stream used by freopen() */ 844 * They lookup/set large fd's for extended FILE support. 848 * The negative value indicates that Extended fd FILE's has not 887 _file_set(FILE *iop, int fd, const char *type) argument 905 dat->_altfd = fd; 911 * Activates extended fd's in FILE's 918 enable_extended_FILE_stdio(int fd, int action) argument 925 if (fd < [all...] |
/osnet-11/usr/src/lib/libc/port/threads/ |
H A D | spawn.c | 90 int fd; local 105 if ((procfd = __open64("/proc/self/fd", O_RDONLY, 0)) < 0) { 127 (fd = atoi(dp->d_name)) != procfd && 128 fd >= lowfd) 129 (void) __close(fd); 191 int fd; local 196 fd = __open(fap->fa_path, fap->fa_oflag, fap->fa_mode); 197 if (fd < 0) 199 if (fd != fap->fa_filedes) { 200 if (__fcntl(fd, F_DUP2F [all...] |
/osnet-11/usr/src/lib/libv12n/sparc/ |
H A D | libv12n.c | 143 int fd; local 148 fd = open(MD_DEVICE, O_RDONLY); 149 if (fd == -1) { 153 if (read(fd, &mdh, sizeof (md_header_t)) != sizeof (md_header_t)) 163 if (read(fd, buf + sizeof (md_header_t), 170 (void) close(fd); 175 (void) close(fd);
|
/osnet-11/usr/src/lib/lvm/libmeta/common/ |
H A D | meta_devadm.c | 996 int fd = -1; local 1270 if ((fd = open(fp, O_RDONLY|O_NDELAY)) < 0) { 1278 rc = devid_get(fd, &devid1); 1279 if (close(fd) < 0) {
|
H A D | meta_error.c | 634 int fd; local 637 if ((fd = open_admin(ep)) < 0) 642 if (ioctl(fd, cmd, data) != 0) {
|
H A D | meta_med.c | 979 int fd; local 997 if ((fd = open(MED_DB_FILE, O_RDONLY, 0)) == -1) { 1026 if ((read(fd, rec_buf, rec_size)) != rec_size) { 1041 if (read(fd, rec_buf, rec_size) == -1) { 1213 if (close(fd) < 0) {
|
H A D | meta_nameinfo.c | 498 int fd; local 535 if ((fd = open(rname, (O_RDONLY|O_NDELAY), 0)) < 0) { 545 if (devid_get(fd, &devid) != 0) { 555 (void) devid_get_minor_name(fd, &minor_name); 585 if (ioctl(fd, DKIOCGGEOM, &geom) != 0) { 589 (void) close(fd); 593 (void) close(fd); 610 partno = efi_alloc_and_read(fd, &gpt); 612 (void) close(fd); 666 if (meta_getvtoc(fd, n 730 int fd; local 801 int fd; local 1313 int fd = -1; local [all...] |
/osnet-11/usr/src/lib/madv/common/ |
H A D | madv.c | 171 int fd = open("/proc/self/auxv", O_RDONLY); local 173 if (fd >= 0) { 174 while (read(fd, &auxb, sizeof (auxv_t)) == sizeof (auxv_t)) { 180 (void) close(fd); 191 int fd; local 195 fd = open("/proc/self/status", O_RDONLY); 197 if (fd >= 0) { 198 if (read(fd, &ps, sizeof (ps)) == sizeof (ps)) { 205 (void) close(fd); 251 int fd; local 724 mmap(void *addr, size_t len, int prot, int flags, int fd, off_t pos) argument 776 mmap64(void *addr, size_t len, int prot, int flags, int fd, off64_t pos) argument [all...] |
/osnet-11/usr/src/lib/storage/libg_fc/common/ |
H A D | genf.c | 612 int fd = -1, retry = 0; local 654 fd = open(path, flag); 655 while (fd < 0 && retry++ < RETRY_OBJECT_OPEN && ( 660 fd = open(path, flag); 662 if (fd < 0) { 665 return (fd);
|
/osnet-11/usr/src/lib/sun_fc/common/ |
H A D | FCHBAPort.cc | 303 int fd; local 324 fd = HBA::_open(FCP_DRIVER_PATH, O_RDONLY | O_NDELAY); 328 if (ioctl(fd, FCP_TGT_SEND_SCSI, fscsi) != 0) { 331 close(fd); 364 close(fd); 710 int fd; local 742 fd = HBA::_open(FCP_DRIVER_PATH, O_RDONLY | O_NDELAY); 746 if (ioctl(fd, FCP_GET_TARGET_MAPPINGS, &fioctl) != 0) { 748 close(fd); 762 close(fd); 1216 int fd = HBA::_open(path, openflag); local [all...] |
/osnet-11/usr/src/lib/libpp/common/ |
H A D | ppproto.c | 64 int fd; /* input file descriptor */ member in struct:proto 700 if ((n = read(proto->fd, ip, proto->iz)) > 0) 705 close(proto->fd); 715 close(proto->fd); 2108 if (proto->flags & MORE) close(proto->fd); 2117 * file !=0 file path to open, otherwise use fd 2118 * fd open file fd if file==0 2125 pppopen(char* file, int fd, char* notice, char* options, char* package, char* comment, int flags) argument 2150 if (file && (fd [all...] |
/osnet-11/usr/src/lib/libproc/common/ |
H A D | Pcore.c | 55 * appropriate fd and offsets, and let the provided prw function do the rest. 69 int fd; local 78 fd = mp->map_file->file_fd; 80 fd = P->asfd; 86 if ((len = prw(fd, buf, len, off)) <= 0) 1690 * Main engine for core file initialization: given an fd for the core file 1738 * 2. We keep the core file fd in P->asfd since the core file contains 2188 int fd, oflag = (gflag & PGRAB_RDONLY) ? O_RDONLY : O_RDWR; local 2190 if ((fd = open64(core, oflag)) >= 0) 2191 return (Pfgrab_core(fd, aou [all...] |
H A D | Pgcore.c | 116 int fd; local 119 if ((fd = creat64(fname, 0666)) < 0) 122 if ((err = Pfgcore(P, fd, content)) != 0) { 123 (void) close(fd); 128 return (close(fd)); 389 write_note(int fd, uint_t type, const void *desc, size_t descsz, off64_t *offp) argument 406 if (pwrite64(fd, &n, sizeof (n), *offp) != sizeof (n)) 411 if (pwrite64(fd, desc, n.nhdr.n_descsz, *offp) != n.nhdr.n_descsz) 993 Pfgcore(struct ps_prochandle *P, int fd, core_content_t content) argument 1003 if (ftruncate64(fd, [all...] |
/osnet-11/usr/src/lib/libradproto/common/ |
H A D | radclient.c | 274 rc_connect_fd(int fd) argument 276 adr_stream_t *str = adr_stream_create_fd(fd);
|