/osnet-11/usr/src/lib/libpkg/common/ |
H A D | pkgweb.c | 523 int len, fd = -1; local 541 if ((fd = open(path, O_RDONLY|O_NONBLOCK)) == -1) { 554 if (fstat(fd, &buf) == -1) { 568 if ((fp = fdopen(fd, "r")) == NULL) { 601 if (fd != -1) 602 (void) close(fd); 1825 int fd, len; local 1845 if ((fd = mkstemp(tmp_file)) == -1) { 1850 if (fstat(fd, &buf) == -1) { 1860 if ((fp = fdopen(fd, " 2135 int i, fd; local [all...] |
/osnet-11/usr/src/lib/libpool/common/ |
H A D | pool.c | 679 int fd; local 682 if ((fd = open(pool_info_location, O_RDONLY)) < 0) { 686 if (ioctl(fd, POOL_STATUSQ, &status) < 0) { 687 (void) close(fd); 691 (void) close(fd); 709 int fd; local 742 if ((fd = open(pool_dynamic_location(), O_RDWR | O_EXCL)) < 0) { 762 (void) close(fd); 769 if (ioctl(fd, POOL_STATUS, &status) < 0) { 770 (void) close(fd); [all...] |
H A D | pool_kernel.c | 3591 int fd; local 3593 while ((fd = open(path, oflag)) == -1 && errno == EBUSY) 3596 return (fd);
|
/osnet-11/usr/src/lib/libcmd/common/ |
H A D | find.c | 917 if (streq(b, "/dev/stdout") || streq(b, "/dev/fd/1")) 1200 int fd; local 1208 if ((fd = open(b, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0) 1213 ops[0] = PROC_FD_DUP(fd, 1, PROC_FD_PARENT|PROC_FD_CHILD);
|
/osnet-11/usr/src/lib/libdevalloc/common/ |
H A D | libdevalloc.c | 92 int fd = -1; local 105 if ((fd = open(LOGINDEVPERM, O_RDONLY)) == -1) 107 if (fstat(fd, &f_stat) != 0) { 108 (void) close(fd); 113 (void) close(fd); 116 if ((fp = fdopen(fd, "rF")) == NULL) { 118 (void) close(fd); 196 int fd = -1; local 223 if ((fd = open(fname, O_RDONLY)) == -1) { 233 (void) close(fd); [all...] |
/osnet-11/usr/src/lib/libdevinfo/ |
H A D | devfsinfo.c | 138 static int prom_find_aliases_node(int fd); 141 static int prom_srch_node(int fd, char *prop_name, char *ret_buf); 142 static uint_t prom_next_node(int fd, uint_t node_id); 143 static uint_t prom_child_node(int fd, uint_t node_id); 2657 prom_srch_node(int fd, char *prop_name, char *ret_buf) argument 2667 if (ioctl(fd, OPROMNXTPROP, opp) < 0) 2674 if (ioctl(fd, OPROMNXTPROP, opp) < 0) 2680 if (ioctl(fd, OPROMGETPROP, opp) < 0) 2693 prom_find_aliases_node(int fd) argument 2698 if ((child_id = prom_next_node(fd, 2718 prom_next_node(int fd, uint_t node_id) argument 2738 prom_child_node(int fd, uint_t node_id) argument [all...] |
H A D | devfsmap.c | 1236 int fd, rv; local 1238 if ((fd = open(VHCI_CTL_NODE, O_RDWR)) < 0) 1240 rv = ioctl(fd, cmd, iocp); 1241 (void) close(fd);
|
/osnet-11/usr/src/lib/libdiskmgt/common/ |
H A D | drive.c | 336 static int check_atapi(int fd); 347 static int get_attrs(disk_t *diskp, int fd, char *opath, 349 static int get_cdrom_drvtype(int fd); 352 static void get_drive_type(disk_t *dp, int fd); 359 static int get_rpm(disk_t *dp, int fd); 364 static int uscsi_mode_sense(int fd, int page_code, 418 int fd; local 427 fd = drive_open_disk(dp->p.disk, opath, sizeof (opath)); 429 if ((*errp = get_attrs(dp->p.disk, fd, opath, attrs)) != 0) { 434 if (fd > 582 int fd; local 623 int fd; local 909 get_attrs(disk_t *diskp, int fd, char *opath, nvlist_t *attrs) argument 1042 get_drive_type(disk_t *dp, int fd) argument 1199 get_rpm(disk_t *dp, int fd) argument 1263 get_cdrom_drvtype(int fd) argument 1330 check_atapi(int fd) argument 1432 uscsi_mode_sense(int fd, int page_code, int page_control, caddr_t page_data, int page_size, struct scsi_ms_header *header) argument [all...] |
/osnet-11/usr/src/lib/libdladm/common/ |
H A D | libdlbridge.c | 1568 int fd; local 1573 if ((fd = socket(PF_TRILL, SOCK_DGRAM, 0)) == -1) 1576 if (ioctl(fd, TRILL_GETBRIDGE, &brcopy) < 0) { 1577 (void) close(fd); 1592 if (ioctl(fd, TRILL_LISTNICK, &tlnread) == -1) { 1601 (void) close(fd);
|
H A D | libdlwlan.c | 1096 int fd, rc; local 1119 if ((fd = open(linkname, O_RDWR)) < 0) 1131 if ((rc = ioctl(fd, I_STR, &stri)) != 0) { 1146 (void) close(fd);
|
/osnet-11/usr/src/lib/libdlpi/common/ |
H A D | libdlpi.c | 1082 i_dlpi_open(const char *provider, int *fd, uint_t flags, boolean_t style1) argument 1094 if ((*fd = open(path, oflags)) != -1) 1130 if ((*fd = open(path, oflags)) != -1) 1175 if ((*fd = open(path, oflags)) != -1) 1188 int fd; local 1190 retval = i_dlpi_open(dip->dli_linkname, &fd, dip->dli_oflags, B_TRUE); 1193 dip->dli_fd = fd; 1210 int fd; local 1213 retval = i_dlpi_open(dip->dli_provider, &fd, dip->dli_oflags, B_FALSE); 1216 dip->dli_fd = fd; 1321 int fd = dip->dli_fd; local 1366 int fd = dip->dli_fd; local [all...] |
/osnet-11/usr/src/lib/libdscfg/common/ |
H A D | cfg.c | 2260 int fd; local 2280 fd = open(wellknown, fmode, 0644); 2281 if (fd < 0) { 2319 if (ftruncate(fd, 0) < 0) 2322 rc = write(fd, location, strlen(location)); 2331 if (lseek(fd, 0, SEEK_SET) < 0) 2335 rc = read(fd, config_file, sizeof (config_file)); 2342 close(fd); 3036 cfg_invalidate_hsizes(int fd, const char *loc) { argument 3049 if (cfg_shldskip_vtoc(fd, lo 3487 cfg_shldskip_vtoc(int fd, const char *loc) argument [all...] |
/osnet-11/usr/src/lib/libinetsvc/common/ |
H A D | inetsvc.c | 1224 int fd; local 1226 fd = socket(AF_UNIX, SOCK_STREAM, 0); 1227 if (fd < 0) 1237 if (connect(fd, (struct sockaddr *)&addr, sizeof (addr)) < 0) { 1238 (void) close(fd); 1242 return (fd); 1254 int fd; local 1256 if ((fd = connect_to_inetd()) < 0) 1260 if (send(fd, &req, sizeof (req), 0) < 0) { 1261 (void) close(fd); 1331 int fd, i, serrno; local 1616 safe_sendto_write(int fd, const void *buf, size_t sz, int flags, const struct sockaddr *to, int tolen) argument 1638 safe_sendto(int fd, const void *buf, size_t sz, int flags, const struct sockaddr *to, int tolen) argument 1644 safe_write(int fd, const void *buf, size_t sz) argument [all...] |
/osnet-11/usr/src/lib/libipadm/common/ |
H A D | ipadm_if.c | 695 ipadm_open_arp_on_udp(const char *udp_dev_name, int *fd) argument 699 if ((*fd = open(udp_dev_name, O_RDWR)) == -1) 709 while (ioctl(*fd, I_POP, 0) != -1) 711 if (errno == EINVAL && ioctl(*fd, I_PUSH, ARP_MOD_NAME) != -1) 714 (void) close(*fd); 761 * Issues the ioctl SIOCSLIFNAME to kernel on the given ARP stream fd. 764 i_ipadm_slifname_arp(char *ifname, uint64_t flags, int fd) argument 778 if (i_ipadm_strioctl(fd, SIOCSLIFNAME, (char *)&lifr, 792 int fd, uint32_t ipadm_flags) 843 err = ioctl(fd, SIOCSLIFNAM 791 i_ipadm_slifname(ipadm_handle_t iph, char *ifname, char *newif, uint64_t flags, int fd, uint32_t ipadm_flags) argument [all...] |
/osnet-11/usr/src/lib/fm/libdisklog/common/ |
H A D | libdisklog.c | 2290 int fd; local 2362 fd = open(filename, O_CREAT | O_EXCL | O_WRONLY, 2364 if (fd < 0) { 2365 dprintf("Creation of %s failed (%d)\n", filename, fd); 2368 stream = fdopen(fd, DL_FILEMODE); 2372 (void) close(fd); 2389 (void) close(fd); 2404 (void) close(fd);
|
/osnet-11/usr/src/lib/fm/topo/libtopo/common/ |
H A D | topo_xml.c | 2169 int fd, const char *filenm, const char *escheme) 2215 if ((document = xmlReadFd(fd, filenm, NULL, readflags)) == NULL) { 2395 int fd; local 2398 if ((fd = open(path, O_RDONLY)) < 0) { 2406 if ((tip = txml_file_parse(tmp, fd, path, escheme)) == NULL) { 2410 (void) close(fd); 2168 txml_file_parse(topo_mod_t *tmp, int fd, const char *filenm, const char *escheme) argument
|
/osnet-11/usr/src/lib/gss_mechs/mech_krb5/krb5/ccache/ |
H A D | cc_file.c | 1226 int fd; local 1251 fd = THREEPARAMOPEN(filename, open_flag | O_NONBLOCK | O_NOFOLLOW, 0600); 1252 if (fd == -1) { 1254 fd = THREEPARAMOPEN(filename, open_flag | O_EXCL | O_CREAT, 1256 if (fd != -1) { 1277 /* If we still don't have a valid fd, we stop trying */ 1278 if (fd == -1) 1289 if (fstat(fd, &fres) == -1) { 1291 close(fd); 1297 close(fd); [all...] |
/osnet-11/usr/src/lib/cfgadm_plugins/ac/common/ |
H A D | mema.c | 458 int fd; local 474 if ((fd = open(bank_spec, ((fdp != NULL) ? O_RDWR : O_RDONLY), 0)) == 492 ret = ioctl(fd, AC_MEM_STAT, &cmd); 498 (void) close(fd); 503 *fdp = fd; 505 (void) close(fd); 588 int fd, ret, ret_errno; local 600 ret = ap_stat(bank_spec, &fd, &bk, &stat, errstring); 609 (void) close(fd); 621 (void) close(fd); 664 int fd, ret, ret_errno; local 769 int fd, ret, ret_errno; local 808 mtest_run( int fd, int test_fun, mema_bank_t *abkp, struct cfga_msg *msgp, char **errstring, ulong_t max_errors) argument 973 int fd, ret, ret_errno; local 1010 int fd, ret, ret_errno; local 1097 int fd, ret; local [all...] |
/osnet-11/usr/src/lib/cfgadm_plugins/pci/common/ |
H A D | cfga.c | 275 int fd; local 283 if ((fd = open(ap_id, O_RDWR)) == -1) { 284 DBG(2, ("open = ap_id%s, fd%d\n", ap_id, fd)); 289 if (fstat(fd, &statbuf) == -1) { 291 (void) close(fd); 294 (void) close(fd); 877 int fd; local 886 if ((fd = open(ap_id, O_RDWR)) == -1) { 887 DBG(2, ("open = ap_id%s, fd 1008 int len, fd, i = 0, repeat = 0; local 1483 int fd; local 1510 int fd; local [all...] |
/osnet-11/usr/src/lib/cfgadm_plugins/shp/common/ |
H A D | shp.c | 1323 int fd; local 1325 fd = di_dli_openr(dlpath); 1326 if (fd < 0) 1329 (void) read(fd, ap_info, ap_info_sz); 1332 di_dli_close(fd);
|
/osnet-11/usr/src/lib/cfgadm_plugins/sysctrl/common/ |
H A D | cfga.c | 538 int fd; local 542 if ((fd = open(ap_id, O_RDWR, 0)) == -1) 544 else if (ioctl(fd, SYSC_CFGA_CMD_GETSTATUS, sc_list) == -1) { 545 (void) close(fd); 548 *fdp = fd; 550 (void) close(fd); 570 int fd; local 592 } else if ((fd = open(ap_id, O_RDWR, 0)) == -1) 594 else if (ioctl(fd, SYSC_CFGA_CMD_GETSTATUS, sim_sc_list) == -1) { 595 (void) close(fd); 617 sim_ioctl(int fd, int cmd, void *a) argument 877 int fd; local 1066 int fd; local [all...] |
/osnet-11/usr/src/lib/efcode/engine/ |
H A D | debug.c | 925 FILE *fd; local 929 if ((fd = popen(buf, "r")) == NULL) 932 while (fgets(buf, sizeof (buf), fd)) 934 (void) pclose(fd);
|
/osnet-11/usr/src/cmd/sendmail/src/ |
H A D | deliver.c | 2793 syserr("deliver: cannot create mailer output channel, fd=%d", 2808 syserr("deliver: cannot create mailer input channel, fd=%d", 5250 int fd; local 5252 fd = sm_io_getinfo(e->e_lockfp, SM_IO_WHAT_FD, NULL); 5253 /* SM_ASSERT(fd >= 0); */ 5254 if (fd >= 0) 5255 (void) close(fd);
|
H A D | main.c | 3284 int fd; local 3324 ** We also compare the fd numbers here since OutChannel 3353 fd = open(SM_PATH_DEVNULL, O_WRONLY, 0666); 3354 if (fd == -1) 3361 if (fd >= 0) 3363 (void) dup2(fd, STDOUT_FILENO); 3364 (void) dup2(fd, STDERR_FILENO); 3365 (void) close(fd); 3890 ** fd -- the file descriptor to be filled. 3903 fill_fd(fd, wher [all...] |
H A D | srvrsmtp.c | 655 /* setup I/O fd correctly for the SMTP server */ 1040 int fd; local 1058 fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); 1060 SM_FD_SET(fd, &readfds); 1062 if (select(fd + 1, FDSET_CAST &readfds, 1064 FD_ISSET(fd, &readfds) && 1887 message("454 4.3.3 TLS not available: error set fd"); 4001 ** SETUP_SMTPD_IO -- setup I/O fd correctly for the SMTP server 4010 ** may change I/O fd.
|