/netbsd-6-1-5-RELEASE/common/dist/zlib/examples/ |
H A D | gzlog.c | 26 int fd; /* log file descriptor */ member in struct:__anon52 41 local int lock(int fd) argument 48 if (flock(fd, LOCK_EX + LOCK_NB) == 0) 59 local void unlock(int fd) argument 61 (void)flock(fd, LOCK_UN); 67 unlock(log->fd); 68 (void)close(log->fd); 149 log->fd = open(path, O_RDWR | O_CREAT, 0600); 150 if (log->fd < 0) { 154 if (lock(log->fd)) { [all...] |
/netbsd-6-1-5-RELEASE/crypto/external/bsd/heimdal/dist/lib/krb5/ |
H A D | store_fd.c | 40 int fd; member in struct:fd_storage 43 #define FD(S) (((fd_storage*)(S)->data)->fd) 94 int fd; local 99 fd = dup(fd_in); 101 fd = _open_osfhandle(fd_in, 0); 104 #error Dont know how to deal with fd that may or may not be a socket. 107 fd = dup(fd_in); 110 if (fd < 0) 115 close(fd); 121 close(fd); [all...] |
H A D | net_write.c | 44 krb5_socket_t fd = *((krb5_socket_t *)p_fd); local 45 return net_write(fd, buf, len); 55 krb5_socket_t fd = *((krb5_socket_t *)p_fd); local 65 FD_SET(fd, &wfds); 74 ret = select(fd + 1, NULL, &wfds, NULL, tvp); 87 count = send (fd, cbuf, rem, 0); 98 if (!FD_ISSET(fd, &wfds)) { 103 count = write (fd, cbuf, rem);
|
/netbsd-6-1-5-RELEASE/external/gpl3/gcc/dist/zlib/examples/ |
H A D | gzlog.c | 24 int fd; /* log file descriptor */ member in struct:__anon43 39 local int lock(int fd) argument 46 if (flock(fd, LOCK_EX + LOCK_NB) == 0) 57 local void unlock(int fd) argument 59 (void)flock(fd, LOCK_UN); 65 unlock(log->fd); 66 (void)close(log->fd); 147 log->fd = open(path, O_RDWR | O_CREAT, 0600); 148 if (log->fd < 0) { 152 if (lock(log->fd)) { [all...] |
/netbsd-6-1-5-RELEASE/sys/arch/zaurus/stand/zboot/ |
H A D | pathfs.c | 34 pathfs_open(const char *path, struct open_file *fd) argument 37 if (strcmp(fd->f_dev->dv_name, "path")) 40 (void) ulseek((int)fd->f_devdata, 0L, SEEK_SET); 45 pathfs_read(struct open_file *fd, void *vbuf, size_t nbyte, size_t *resid) argument 52 rsz = uread((int)fd->f_devdata, buf + off, nbyte - off); 65 pathfs_write(struct open_file *fd, void *vbuf, size_t size, size_t *resid) argument 72 pathfs_seek(struct open_file *fd, off_t offset, int whence) argument 75 return ulseek((int)fd->f_devdata, offset, whence); 79 pathfs_close(struct open_file *fd) argument 86 pathfs_stat(struct open_file *fd, struc argument [all...] |
/netbsd-6-1-5-RELEASE/external/ibm-public/postfix/dist/src/tls/ |
H A D | tls_prng_exch.c | 87 int fd; local 89 if ((fd = open(name, O_RDWR | O_CREAT, 0600)) < 0) 92 eh->fd = fd; 111 if (myflock(eh->fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) != 0) 113 if (lseek(eh->fd, 0, SEEK_SET) < 0) 115 if ((count = read(eh->fd, buffer, sizeof(buffer))) < 0) 122 if (lseek(eh->fd, 0, SEEK_SET) < 0) 124 if (write(eh->fd, buffer, sizeof(buffer)) != sizeof(buffer)) 126 if (myflock(eh->fd, INTERNAL_LOC [all...] |
/netbsd-6-1-5-RELEASE/usr.sbin/btattach/ |
H A D | init_unistone.c | 54 infineon_manufacturer_mode(int fd, int enable) argument 63 uart_send_cmd(fd, 0xfc11, cmd, sizeof(cmd)); 64 n = uart_recv_cc(fd, 0xfc11, &rp, sizeof(rp)); 73 init_unistone(int fd, unsigned int speed) argument 97 if (tcgetattr(fd, &tio) != 0) 100 infineon_manufacturer_mode(fd, 1); 102 uart_send_cmd(fd, HCI_CMD_INFINEON_SET_UART_BAUDRATE, &rate, 105 n = uart_recv_ev(fd, HCI_EVENT_COMMAND_STATUS, &cs, sizeof(cs)); 112 tcsetattr(fd, TCSANOW, &tio) != 0) 115 n = uart_recv_ev(fd, HCI_EVENT_VENDO [all...] |
/netbsd-6-1-5-RELEASE/tests/lib/libc/sys/ |
H A D | t_dup.c | 57 int fd, fd1, fd2; local 75 fd = dup(fd1); 77 fd = dup2(fd1, fd2); 79 fd = dup3(fd1, fd2, O_CLOEXEC); 81 fd = -1; 84 ATF_REQUIRE(fd >= 0); 89 ATF_REQUIRE(fstat(fd, &st) == 0); 95 (void)close(fd); 111 int fd, fd1, fd2; local 119 fd 139 int fd; local 203 int fd; local 285 int *buf, fd, sta; local [all...] |
/netbsd-6-1-5-RELEASE/external/gpl3/gdb/dist/gdb/testsuite/gdb.arch/ |
H A D | spu-info.c | 49 int prot, int flags, int fd, off_t offset) 57 int fd __attribute__ ((aligned (16))); member in struct:mmap_args 65 args.fd = fd; 102 sprintf (buf, "/proc/self/fd/%d/%s", context_fd, name); 136 int fd, cnt; local 140 fd = open (file, O_CREAT | O_RDWR | O_TRUNC, 0777); 141 if (fd == -1) 144 write (fd, buf, BSIZE); 145 write (fd, bu 48 mmap_ea(unsigned long long start, size_t length, int prot, int flags, int fd, off_t offset) argument 186 int ret, buf, fd; local [all...] |
/netbsd-6-1-5-RELEASE/sys/arch/x68k/stand/newdisk/ |
H A D | newdisk.c | 73 int fd; local 106 fd = opendisk(argv[0], O_RDONLY, dev, MAXPATHLEN, 0); 107 if (fd < 0) 112 if (read(fd, buf, 512) < 0) 123 if (ioctl(fd, DIOCGDINFO, &label) < 0) 125 close(fd); 147 fd = open(mboot, O_RDONLY); 148 if (fd < 0) 150 if (read(fd, buf+1024, 1024) < 0) 152 close(fd); [all...] |
/netbsd-6-1-5-RELEASE/bin/ksh/ |
H A D | io.c | 251 /* test if we can seek backwards fd (returns 0 or SHF_UNBUF) */ 253 can_seek(fd) 254 int fd; 258 return fstat(fd, &statb) == 0 && !S_ISREG(statb.st_mode) ? 296 * move fd from user space (0<=fd<10) to shell space (fd>=10), 300 savefd(fd, noclose) 301 int fd; 306 if (fd < FDBAS 363 int fd, fl; local 469 int fd = (mode & R_OK) ? coproc.read : coproc.write; local 519 int fd; local [all...] |
/netbsd-6-1-5-RELEASE/sbin/wdogctl/ |
H A D | wdogctl.c | 192 int fd; local 196 fd = open(_PATH_WATCHDOG, O_RDWR, 0644); 197 if (fd == -1) 200 if (ioctl(fd, WDOGIOC_SMODE, &wm) == -1) 203 (void)close(fd); 210 int fd; local 214 fd = open(_PATH_WATCHDOG, O_RDWR, 0644); 215 if (fd == -1) 217 if (ioctl(fd, WDOGIOC_SMODE, &wm) == -1) { 220 if (ioctl(fd, WDOGIOC_TICKL 234 int fd, rv; local 315 int fd; local 331 int fd, mode; local 370 int fd, count, i, mode; local [all...] |
/netbsd-6-1-5-RELEASE/usr.sbin/makefs/cd9660/ |
H A D | cd9660_write.c | 62 FILE *fd; local 66 if ((fd = fopen(image, "w+")) == NULL) { 75 status = cd9660_copy_file(fd, 0, 85 status = cd9660_write_volume_descriptors(fd); 99 status = cd9660_write_path_tables(fd); 109 status = cd9660_write_file(fd, diskStructure.rootNode); 116 cd9660_write_boot(fd); 121 cd9660_write_filedata(fd, diskStructure.totalSectors - 1, buf, 1); 125 fclose(fd); 132 fclose(fd); 141 cd9660_write_volume_descriptors(FILE *fd) argument 164 cd9660_write_path_table(FILE *fd, off_t sector, int mode) argument 238 cd9660_write_path_tables(FILE *fd) argument 264 cd9660_write_file(FILE *fd, cd9660node *writenode) argument 400 cd9660_write_filedata(FILE *fd, off_t sector, const unsigned char *buf, int numsecs) argument 434 cd9660_copy_file(FILE *fd, off_t start_sector, const char *filename) argument 483 cd9660_write_rr(FILE *fd, cd9660node *writenode, off_t offset, off_t sector) argument [all...] |
/netbsd-6-1-5-RELEASE/crypto/external/bsd/heimdal/dist/lib/roken/ |
H A D | eread.c | 45 eread (int fd, void *buf, size_t nbytes) argument 49 ret = net_read (fd, buf, nbytes);
|
H A D | ewrite.c | 45 ewrite (int fd, const void *buf, size_t nbytes) argument 49 ret = net_write (fd, buf, nbytes);
|
/netbsd-6-1-5-RELEASE/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/ |
H A D | tpm_startup.c | 45 int fd; local 49 fd = open( "/dev/tpm0", O_RDWR ); 50 if ( fd < 0 ) { 55 err = write( fd, startup, sizeof(startup) ); 62 err = read( fd, startup, sizeof(startup) ); 83 err = write( fd, selftest, sizeof(selftest) ); 90 err = read( fd, selftest, sizeof(selftest) ); 105 close(fd);
|
/netbsd-6-1-5-RELEASE/distrib/utils/libhack/ |
H A D | opendir.c | 61 int fd; local 64 if ((fd = open(name, O_RDONLY | O_NONBLOCK)) == -1) 66 if (fstat(fd, &sb) || !S_ISDIR(sb.st_mode)) { 68 close(fd); 71 if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 || 73 close(fd); 86 close (fd); 93 dirp->dd_fd = fd;
|
/netbsd-6-1-5-RELEASE/external/gpl3/binutils/dist/gas/testsuite/gas/rx/ |
H A D | adc.d | 9 0: fd 74 20 80 adc #-128, r0 10 4: fd 74 2f 80 adc #-128, r15 11 8: fd 74 20 7f adc #127, r0 12 c: fd 74 2f 7f adc #127, r15 13 10: fd 78 20 00 80 adc #0xffff8000, r0 14 15: fd 78 2f 00 80 adc #0xffff8000, r15 15 1a: fd 7c 20 00 80 00 adc #0x8000, r0 16 20: fd 7c 2f 00 80 00 adc #0x8000, r15 17 26: fd 7c 20 00 00 80 adc #0xff800000, r0 18 2c: fd [all...] |
H A D | sbb.d | 25 48: fd 74 20 7f adc #127, r0 26 4c: fd 74 2f 7f adc #127, r15 27 50: fd 74 20 80 adc #-128, r0 28 54: fd 74 2f 80 adc #-128, r15 29 58: fd 78 20 ff 7f adc #0x7fff, r0 30 5d: fd 78 2f ff 7f adc #0x7fff, r15 31 62: fd 7c 20 ff 7f ff adc #0xffff7fff, r0 32 68: fd 7c 2f ff 7f ff adc #0xffff7fff, r15 33 6e: fd 7c 20 ff ff 7f adc #0x7fffff, r0 34 74: fd [all...] |
/netbsd-6-1-5-RELEASE/sys/arch/sbmips/stand/common/ |
H A D | common.h | 56 #define booted_dev_setfd(fd) ((void)(booted_dev_fd = fd))
|
/netbsd-6-1-5-RELEASE/sys/arch/i386/stand/lib/test/ |
H A D | biosdisk_user.c | 48 static int fd = -1; variable 55 if (fd != -1) { 56 close(fd); 57 fd = -1; 72 fd = open(emuldisktab[i].name, O_RDONLY, 0); 73 if (fd < 0) { 97 if (lseek(fd, ((cyl * emuldisktab[currentdte].heads + head) 103 if (read(fd, buf, nsec * 512) != nsec * 512) {
|
/netbsd-6-1-5-RELEASE/regress/sys/kern/lockf2/ |
H A D | lockf2.c | 36 dolock(int fd, int op, off_t off, off_t size) argument 41 result = lseek(fd, off, SEEK_SET); 46 ret = lockf(fd, op, size); 56 int fd = STDOUT_FILENO; local 61 error = dolock(fd, F_LOCK, 0, 1); 67 error = dolock(fd, F_LOCK, 1, 1); 69 dolock(fd, F_LOCK, 0, 1); /* will block */ 74 error = dolock(fd, F_LOCK, 1, 1);
|
/netbsd-6-1-5-RELEASE/sbin/gpt/ |
H A D | destroy.c | 61 destroy(int fd) argument 80 gpt_write(fd, pri_hdr); 85 gpt_write(fd, sec_hdr); 92 int ch, fd; local 108 fd = gpt_open(argv[optind++]); 109 if (fd == -1) { 114 destroy(fd); 116 gpt_close(fd);
|
/netbsd-6-1-5-RELEASE/lib/libc/stdio/ |
H A D | dprintf.c | 50 dprintf(int fd, const char * __restrict fmt, ...) argument 56 ret = vdprintf(fd, fmt, ap);
|
/netbsd-6-1-5-RELEASE/lib/librumpuser/ |
H A D | rumpuser_daemonize.c | 96 int fd; local 102 fd = open(_PATH_DEVNULL, O_RDWR); 103 if (fd == -1) { 107 dup2(fd, STDIN_FILENO); 108 dup2(fd, STDOUT_FILENO); 109 dup2(fd, STDERR_FILENO); 110 if (fd > STDERR_FILENO) 111 close(fd);
|