/freebsd-10.0-release/usr.bin/wall/ |
H A D | ttymsg.c | 64 int cnt, fd; local 89 if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) { 101 wret = writev(fd, iov, iovcnt); 126 (void) close(fd); 133 (void) close(fd); 137 (void) close(fd); 146 (void) fcntl(fd, F_SETFL, 0); /* clear O_NONBLOCK */ 155 (void) close(fd); 163 (void) close(fd);
|
/freebsd-10.0-release/usr.sbin/cron/lib/ |
H A D | compat.c | 107 int fd; local 113 if ((fd = open(_PATH_TTY, 2)) >= 0) 115 (void) ioctl(fd, TIOCNOTTY, (char*)0); 116 (void) close(fd); 152 * flock (fd, operation) 155 * on the object described by the int file descriptor 'fd', 183 flock(fd, operation) 184 int fd; 192 i = lockf (fd, F_LOCK, 0); 197 i = lockf (fd, F_TLOC [all...] |
/freebsd-10.0-release/usr.sbin/digictl/ |
H A D | digictl.c | 55 int altpin, ch, debug, fd, i, res; local 106 if ((fd = open(argv[i], O_RDONLY)) == -1) { 119 if (ioctl(fd, DIGIIO_SETALTPIN, &altpin) != 0) { 127 if (ioctl(fd, DIGIIO_GETALTPIN, &altpin) != 0) { 139 if (dflag && ioctl(fd, DIGIIO_DEBUG, &debug) != 0) { 146 if (ioctl(fd, DIGIIO_MODEL, &model) != 0) { 150 } else if (ioctl(fd, DIGIIO_IDENT, &name) != 0) { 161 if (rflag && ioctl(fd, DIGIIO_REINIT) != 0) { 167 close(fd);
|
/freebsd-10.0-release/contrib/llvm/tools/lldb/source/Utility/ |
H A D | KQueue.cpp | 31 const int fd = m_fd; local 32 if (fd >= 0) 35 return close(fd); 57 error.SetErrorString("invalid kqueue fd"); 63 KQueue::AddFDEvent (int fd, bool read, bool write, bool vnode) argument 69 event.ident = fd;
|
/freebsd-10.0-release/contrib/wpa/src/l2_packet/ |
H A D | l2_packet_none.c | 26 int fd; member in struct:l2_packet_data 86 l2->fd = -1; 87 eloop_register_read_sock(l2->fd, l2_packet_receive, l2, NULL); 98 if (l2->fd >= 0) { 99 eloop_unregister_read_sock(l2->fd);
|
/freebsd-10.0-release/crypto/openssh/openbsd-compat/ |
H A D | port-uw.c | 94 FILE *fd; local 97 if ((fd = fopen (password_file, "r")) == NULL) { 111 while (ent = fgetpwent(fd)) { 114 fclose (fd); 119 fclose (fd);
|
/freebsd-10.0-release/lib/libc/gen/ |
H A D | ttyname.c | 60 ttyname_r(int fd, char *buf, size_t len) argument 67 if (!isatty(fd)) 75 if (fdevname_r(fd, buf + used, len - used) == NULL) 87 ttyname(int fd) argument 107 if (ttyname_r(fd, buf, sizeof ttyname_buf) != 0)
|
/freebsd-10.0-release/lib/libc/iconv/ |
H A D | citrus_mmap.c | 54 int fd, ret; local 60 if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1) 63 if (fstat(fd, &st) == -1) { 73 fd, (off_t)0); 81 (void)close(fd);
|
/freebsd-10.0-release/lib/libc/stdio/ |
H A D | fdopen.c | 50 fdopen(int fd, const char *mode) argument 58 * SHRT_MAX, then the fd will get sign-extended into an 62 if (fd > SHRT_MAX) { 71 if ((fdflags = _fcntl(fd, F_GETFL, 0)) < 0) 82 if ((oflags & O_CLOEXEC) && _fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) { 95 fp->_file = fd;
|
/freebsd-10.0-release/sbin/nvmecontrol/ |
H A D | devlist.c | 67 int ch, ctrlr, fd, found, ret; local 83 ret = open_dev(name, &fd, 0, 0); 94 read_controller_data(fd, &cdata); 101 read_namespace_data(fd, i+1, &nsdata); 109 close(fd);
|
H A D | firmware.c | 52 slot_has_valid_firmware(int fd, int slot) argument 57 read_logpage(fd, NVME_LOG_FIRMWARE_SLOT, 71 int fd; local 76 if ((fd = open(path, O_RDONLY)) < 0) 78 if (fstat(fd, &sb) < 0) 98 if ((*size = read(fd, *buf, filesize)) < 0) 108 update_firmware(int fd, uint8_t *payload, int32_t payload_size) argument 133 if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) 145 activate_firmware(int fd, int slot, int activate_action) argument 154 if (ioctl(fd, NVME_PASSTHROUGH_CM 172 int fd = -1, slot = 0; local [all...] |
/freebsd-10.0-release/share/examples/ses/srcs/ |
H A D | setobjstat.c | 48 int fd; local 60 fd = open(v[1], O_RDWR); 61 if (fd < 0) { 79 if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &obj) < 0) { 82 (void) close(fd);
|
/freebsd-10.0-release/tools/regression/lib/libc/stdio/ |
H A D | test-fopen.c | 46 int fd, flags, wantedflags; local 56 fd = fileno(fp); 57 if (fd < 0) 62 if (fcntl(fd, F_GETFD) == (strchr(mode, 'e') != NULL ? FD_CLOEXEC : 0)) 66 flags = fcntl(fd, F_GETFL);
|
/freebsd-10.0-release/tools/regression/priv/ |
H A D | priv_io.c | 83 int error, fd; local 85 fd = open(DEV_IO, O_RDONLY); 86 if (fd < 0) 98 if (fd != -1) 99 close(fd);
|
/freebsd-10.0-release/tools/tools/ath/arcode/ |
H A D | arcode.c | 76 int fd; local 85 fd = open(file, O_RDONLY); 86 if (fd < 0) { 92 r = read(fd, &a, sizeof(a)); 113 close(fd);
|
/freebsd-10.0-release/usr.bin/cksum/ |
H A D | cksum.c | 65 int ch, fd, rval; local 108 fd = STDIN_FILENO; 114 if ((fd = open(fn, O_RDONLY, 0)) < 0) { 120 if (cfncn(fd, &val, &len)) { 125 (void)close(fd);
|
/freebsd-10.0-release/usr.sbin/fdread/ |
H A D | fdread.c | 50 static int doread(int fd, FILE *of, const char *_devname); 51 static int doreadid(int fd, unsigned int numids, unsigned int trackno); 72 int fd; local 152 if ((fd = open(_devname, O_RDONLY)) == -1) 155 return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname)); 159 doread(int fd, FILE *of, const char *_devname) argument 167 if (ioctl(fd, FD_GTYPE, &fdt) == -1) 181 if (lseek(fd, nbytes, SEEK_SET) != nbytes) 183 rv = read(fd, trackbu 298 doreadid(int fd, unsigned int numids, unsigned int trackno) argument [all...] |
/freebsd-10.0-release/usr.sbin/mlxcontrol/ |
H A D | interface.c | 47 int i, fd; local 52 if ((fd = open(ctrlrpath(i), 0)) >= 0) 53 close(fd); 55 if (fd >= 0) { 62 * Open the controller (unit) and give the fd to (func) along with (arg) 65 mlx_perform(int unit, void (*func)(int fd, void *arg), void *arg) argument 67 int fd; local 69 if ((fd = open(ctrlrpath(unit), 0)) >= 0) { 70 func(fd, arg); 71 close(fd); 82 int i, fd, ctrlfd; local 129 int i, fd; local 171 mlx_command(int fd, void *arg) argument [all...] |
/freebsd-10.0-release/usr.sbin/nandtool/ |
H A D | nand_info.c | 42 int fd = -1, ret = 0; local 53 if ((fd = g_open(dev, 1)) == -1) { 58 if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) == -1) { 64 if (ioctl(fd, DIOCGMEDIASIZE, &media_size) == -1) { 83 g_close(fd);
|
H A D | nand_writeoob.c | 44 int fd = -1, fd_in = -1, ret = 0; local 63 if ((fd = g_open(dev, 1)) == -1) { 74 if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) == -1) { 97 if (ioctl(fd, NAND_IO_OOB_PROG, &req) == -1) { 104 g_close(fd);
|
/freebsd-10.0-release/sbin/geom/misc/ |
H A D | subr.c | 194 int fd; local 196 fd = g_open(name, 0); 197 if (fd == -1) 199 mediasize = g_mediasize(fd); 202 (void)g_close(fd); 210 int fd; local 212 fd = g_open(name, 0); 213 if (fd == -1) 215 sectorsize = g_sectorsize(fd); 218 (void)g_close(fd); 230 int error, fd; local 280 int error, fd; local 325 int error, fd; local [all...] |
/freebsd-10.0-release/contrib/ipfilter/ipsd/ |
H A D | sdlpi.c | 82 int readloop(fd, port, dst) 83 int fd, port; 95 fd = solfd; 105 i = getmsg(fd, NULL, &dbuf, &flags); 158 int i, offset, fd, snaplen= 58, chunksize = BUFSPACE; local 175 if ((fd = open(devname, O_RDWR)) < 0) 181 if (dlattachreq(fd, i) == -1 || dlokack(fd, buf) == -1) 186 dlbindreq(fd, ETHERTYPE_IP, 0, DL_CLDLS, 0, 0); 187 dlbindack(fd, bu [all...] |
/freebsd-10.0-release/contrib/ntp/ntpd/ |
H A D | refclock_arbiter.c | 144 int fd; local 151 if (!(fd = refclock_open(device, SPEED232, LDISC_CLK))) 158 (void) close(fd); 166 pp->io.fd = fd; 168 (void) close(fd); 180 write(pp->io.fd, "B0", 2); 263 write(pp->io.fd, "SR", 2); 269 write(pp->io.fd, "LA", 2); 271 write(pp->io.fd, "B [all...] |
/freebsd-10.0-release/contrib/wpa/src/wps/ |
H A D | http_server.c | 24 int fd; member in struct:http_request 33 int fd; member in struct:http_server 61 static struct http_request * http_request_init(struct http_server *srv, int fd, argument 76 req->fd = fd; 79 req->hread = httpread_create(req->fd, http_request_cb, req, 116 close(req->fd); 141 res = send(req->fd, wpabuf_head(resp), wpabuf_len(resp), 0); 207 conn = accept(srv->fd, (struct sockaddr *) &addr, &addr_len); 242 srv->fd [all...] |
/freebsd-10.0-release/usr.sbin/ofwdump/ |
H A D | ofwdump.c | 69 int opt, i, fd; local 116 fd = ofw_open(O_RDONLY); 120 ofw_dump(fd, NULL, rflag, pflag, Parg, Rflag, Sflag); 127 ofw_dump(fd, argv[i], rflag, pflag, Parg, Rflag, Sflag); 129 ofw_close(fd); 143 ofw_dump_properties(int fd, phandle_t n, int level, const char *pmatch, int raw, argument 153 for (nlen = ofw_firstprop(fd, n, prop, sizeof(prop)); nlen != 0; 154 nlen = ofw_nextprop(fd, n, prop, prop, sizeof(prop))) { 157 len = ofw_getprop_alloc(fd, n, prop, &pbuf, &pblen, 1); 205 ofw_dump_node(int fd, phandle_ argument 233 ofw_dump(int fd, const char *start, int rec, int prop, const char *pmatch, int raw, int str) argument [all...] |