Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 135) sorted by relevance

123456

/illumos-kvm-cmd/net/
H A Dsocket.c37 int fd; member
49 int fd; member
155 int fd; in net_socket_mcast_create() local
219 return fd; in net_socket_mcast_create()
261 fd); in net_socket_fd_init_dgram()
268 close(fd); in net_socket_fd_init_dgram()
291 s->fd = fd; in net_socket_fd_init_dgram()
328 s->fd = fd; in net_socket_fd_init_stream()
368 int fd; in net_socket_accept() local
427 s->fd = fd; in net_socket_listen_init()
[all …]
H A Dtap-linux.c41 int fd, ret; in tap_open() local
43 TFR(fd = open(PATH_NET_TUN, O_RDWR)); in tap_open()
44 if (fd < 0) { in tap_open()
65 close(fd); in tap_open()
77 close(fd); in tap_open()
81 fcntl(fd, F_SETFL, O_NONBLOCK); in tap_open()
82 return fd; in tap_open()
97 int tap_set_sndbuf(int fd, QemuOpts *opts) in tap_set_sndbuf() argument
113 int tap_probe_vnet_hdr(int fd) in tap_probe_vnet_hdr() argument
117 if (ioctl(fd, TUNGETIFF, &ifr) != 0) { in tap_probe_vnet_hdr()
[all …]
H A Dtap-bsd.c42 int fd; in tap_open() local
61 TFR(fd = open(dname, O_RDWR)); in tap_open()
62 if (fd >= 0) { in tap_open()
72 if (fd < 0) { in tap_open()
79 if (fd < 0) { in tap_open()
85 fstat(fd, &s); in tap_open()
96 close(fd); in tap_open()
100 fcntl(fd, F_SETFL, O_NONBLOCK); in tap_open()
101 return fd; in tap_open()
109 int tap_probe_vnet_hdr(int fd) in tap_probe_vnet_hdr() argument
[all …]
H A Dtap.c54 int fd; member
272 if (s->fd < 0) { in tap_set_offload()
295 close(s->fd); in tap_cleanup()
296 s->fd = -1; in tap_cleanup()
310 return s->fd; in tap_get_fd()
338 s->fd = fd; in net_tap_fd_init()
410 if (fd < 0) { in net_tap_init()
419 close(fd); in net_tap_init()
425 return fd; in net_tap_init()
443 if (fd == -1) { in net_init_tap()
[all …]
H A Ddump.c33 int fd; member
66 if (s->fd < 0) { in dump_receive()
78 write(s->fd, buf, caplen) != caplen) { in dump_receive()
80 close(s->fd); in dump_receive()
81 s->fd = -1; in dump_receive()
91 close(s->fd); in dump_cleanup()
107 int fd; in net_dump_init() local
110 if (fd < 0) { in net_dump_init()
123 if (write(fd, &hdr, sizeof(hdr)) < sizeof(hdr)) { in net_dump_init()
125 close(fd); in net_dump_init()
[all …]
H A Dtap-solaris.c179 int fd; in tap_open() local
180 if( (fd = tap_alloc(dev, sizeof(dev))) < 0 ){ in tap_open()
192 close(fd); in tap_open()
196 fcntl(fd, F_SETFL, O_NONBLOCK); in tap_open()
197 return fd; in tap_open()
200 int tap_set_sndbuf(int fd, QemuOpts *opts) in tap_set_sndbuf() argument
205 int tap_probe_vnet_hdr(int fd) in tap_probe_vnet_hdr() argument
210 int tap_probe_has_ufo(int fd) in tap_probe_has_ufo() argument
215 int tap_probe_vnet_hdr_len(int fd, int len) in tap_probe_vnet_hdr_len() argument
220 void tap_fd_set_vnet_hdr_len(int fd, int len) in tap_fd_set_vnet_hdr_len() argument
[all …]
H A Dtap-aix.c34 int tap_set_sndbuf(int fd, QemuOpts *opts) in tap_set_sndbuf() argument
39 int tap_probe_vnet_hdr(int fd) in tap_probe_vnet_hdr() argument
44 int tap_probe_has_ufo(int fd) in tap_probe_has_ufo() argument
49 int tap_probe_vnet_hdr_len(int fd, int len) in tap_probe_vnet_hdr_len() argument
54 void tap_fd_set_vnet_hdr_len(int fd, int len) in tap_fd_set_vnet_hdr_len() argument
58 void tap_fd_set_offload(int fd, int csum, int tso4, in tap_fd_set_offload() argument
H A Dtap-haiku.c34 int tap_set_sndbuf(int fd, QemuOpts *opts) in tap_set_sndbuf() argument
39 int tap_probe_vnet_hdr(int fd) in tap_probe_vnet_hdr() argument
44 int tap_probe_has_ufo(int fd) in tap_probe_has_ufo() argument
49 int tap_probe_vnet_hdr_len(int fd, int len) in tap_probe_vnet_hdr_len() argument
54 void tap_fd_set_vnet_hdr_len(int fd, int len) in tap_fd_set_vnet_hdr_len() argument
58 void tap_fd_set_offload(int fd, int csum, int tso4, in tap_fd_set_offload() argument
/illumos-kvm-cmd/block/
H A Draw-posix.c113 int fd; member
162 s->fd = -1; in raw_open_common()
170 s->fd = fd; in raw_open_common()
219 close(fd); in raw_open_common()
622 int fd = s->fd; in raw_getlength() local
667 int fd = s->fd; in raw_getlength() local
735 int fd; in raw_create() local
1044 int fd; in hdev_create() local
1176 int fd; in floppy_eject() local
1348 int fd; in cdrom_reopen() local
[all …]
H A Dsheepdog.c295 int fd; member
587 int fd, ret; in connect_to_sdog() local
629 fd = -1; in connect_to_sdog()
633 return fd; in connect_to_sdog()
793 int fd = s->fd; in aio_read_response() local
915 int ret, fd; in get_sheep_fd() local
934 return fd; in get_sheep_fd()
1009 int ret, fd; in find_vdi_name() local
1180 int ret, fd; in sd_open() local
1190 s->fd = -1; in sd_open()
[all …]
/illumos-kvm-cmd/hw/
H A Dloader.c60 int fd, size; in get_image_size() local
62 if (fd < 0) in get_image_size()
65 close(fd); in get_image_size()
75 if (fd < 0) in load_image()
83 close(fd); in load_image()
184 if (fd < 0) in load_aout()
223 close(fd); in load_aout()
226 close(fd); in load_aout()
323 close(fd); in load_elf()
327 close(fd); in load_elf()
[all …]
H A Dvirtio-9p-local.c114 int fd; in local_readlink() local
116 if (fd == -1) { in local_readlink()
122 close(fd); in local_readlink()
133 return close(fd); in local_close()
318 int fd = -1; in local_open2() local
326 return fd; in local_open2()
339 return fd; in local_open2()
347 return fd; in local_open2()
350 close(fd); in local_open2()
365 int fd; in local_symlink() local
[all …]
H A Devent_notifier.c22 int fd = eventfd(!!active, EFD_NONBLOCK | EFD_CLOEXEC); in event_notifier_init() local
23 if (fd < 0) in event_notifier_init()
25 e->fd = fd; in event_notifier_init()
34 close(e->fd); in event_notifier_cleanup()
39 return e->fd; in event_notifier_get_fd()
45 int r = read(e->fd, &value, sizeof(value)); in event_notifier_test_and_clear()
52 int r = read(e->fd, &value, sizeof(value)); in event_notifier_test()
55 int s = write(e->fd, &value, sizeof(value)); in event_notifier_test()
/illumos-kvm-cmd/
H A Daio.c32 int fd; member
42 static AioHandler *find_aio_handler(int fd) in find_aio_handler() argument
47 if (node->fd == fd) in find_aio_handler()
55 int qemu_aio_set_fd_handler(int fd, in qemu_aio_set_fd_handler() argument
64 node = find_aio_handler(fd); in qemu_aio_set_fd_handler()
85 node->fd = fd; in qemu_aio_set_fd_handler()
177 FD_SET(node->fd, &rdfds); in qemu_aio_wait()
178 max_fd = MAX(max_fd, node->fd + 1); in qemu_aio_wait()
181 FD_SET(node->fd, &wrfds); in qemu_aio_wait()
208 FD_ISSET(node->fd, &rdfds) && in qemu_aio_wait()
[all …]
H A Dmigration-fd.c41 return write(s->fd, buf, size); in fd_write()
47 if (s->fd != -1) { in fd_close()
48 close(s->fd); in fd_close()
49 s->fd = -1; in fd_close()
65 s->fd = monitor_get_fd(mon, fdname); in fd_start_outgoing_migration()
66 if (s->fd == -1) { in fd_start_outgoing_migration()
71 if (fcntl(s->fd, F_SETFL, O_NONBLOCK) == -1) { in fd_start_outgoing_migration()
98 close(s->fd); in fd_start_outgoing_migration()
115 int fd; in fd_start_incoming_migration() local
120 fd = strtol(infd, NULL, 0); in fd_start_incoming_migration()
[all …]
H A Dqemu-char.c844 int fd; member
1211 int fd; in qemu_chr_open_tty() local
1218 chr = qemu_chr_open_fd(fd, fd); in qemu_chr_open_tty()
1236 int fd; member
1254 int fd = drv->fd; in pp_ioctl() local
1335 int fd = drv->fd; in pp_close() local
1349 int fd; in qemu_chr_open_pp() local
1361 drv->fd = fd; in qemu_chr_open_pp()
1880 s->fd = fd; in qemu_chr_open_udp()
2155 s->fd = fd; in tcp_chr_accept()
[all …]
H A Dbt-vhci.c30 int fd; member
46 s->len = read(s->fd, s->hdr, sizeof(s->hdr)); in vhci_read()
105 while (writev(s->fd, iv, 2) < 0) in vhci_host_send()
118 while (write(s->fd, buf, len + 1) < 0) in vhci_host_send()
143 int fd; in bt_vhci_init() local
145 fd = open(VHCI_DEV, O_RDWR); in bt_vhci_init()
147 if (fd < 0) { in bt_vhci_init()
148 fd = open(VHCI_UDEV, O_RDWR); in bt_vhci_init()
152 if (fd < 0) { in bt_vhci_init()
161 s->fd = fd; in bt_vhci_init()
[all …]
H A Dmigration-unix.c39 return write(s->fd, buf, size); in unix_write()
45 if (s->fd != -1) { in unix_close()
46 close(s->fd); in unix_close()
47 s->fd = -1; in unix_close()
68 qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); in unix_wait_for_connect()
107 s->fd = qemu_socket(PF_UNIX, SOCK_STREAM, 0); in unix_start_outgoing_migration()
108 if (s->fd < 0) { in unix_start_outgoing_migration()
113 socket_set_nonblock(s->fd); in unix_start_outgoing_migration()
116 ret = connect(s->fd, (struct sockaddr *)&addr, sizeof(addr)); in unix_start_outgoing_migration()
121 qemu_set_fd_handler2(s->fd, NULL, NULL, unix_wait_for_connect, s); in unix_start_outgoing_migration()
[all …]
H A Dmigration-tcp.c39 return send(s->fd, buf, size, 0); in socket_write()
45 if (s->fd != -1) { in tcp_close()
46 close(s->fd); in tcp_close()
47 s->fd = -1; in tcp_close()
61 ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, (void *) &val, &valsize); in tcp_wait_for_connect()
69 qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); in tcp_wait_for_connect()
108 s->fd = qemu_socket(PF_INET, SOCK_STREAM, 0); in tcp_start_outgoing_migration()
109 if (s->fd == -1) { in tcp_start_outgoing_migration()
114 socket_set_nonblock(s->fd); in tcp_start_outgoing_migration()
121 ret = connect(s->fd, (struct sockaddr *)&addr, sizeof(addr)); in tcp_start_outgoing_migration()
[all …]
H A Dbt-host.c41 int fd; member
59 while (writev(s->fd, iv, 2) < 0) { in bt_host_send()
92 s->len = read(s->fd, s->hdr, sizeof(s->hdr)); in bt_host_read()
149 int fd = -1; in bt_host_hci() local
159 fd = hci_open_dev(dev_id); in bt_host_hci()
164 if (fd < 0) { in bt_host_hci()
175 if (setsockopt(fd, SOL_HCI, HCI_FILTER, &flt, sizeof(flt)) < 0) { in bt_host_hci()
182 s->fd = fd; in bt_host_hci()
188 qemu_set_fd_handler(s->fd, bt_host_read, NULL, s); in bt_host_hci()
H A Dnbd.c70 #define read_sync(fd, buffer, size) nbd_wr_sync(fd, buffer, size, true) argument
71 #define write_sync(fd, buffer, size) nbd_wr_sync(fd, buffer, size, false) argument
483 int nbd_disconnect(int fd) in nbd_disconnect() argument
485 ioctl(fd, NBD_CLEAR_QUE); in nbd_disconnect()
486 ioctl(fd, NBD_DISCONNECT); in nbd_disconnect()
487 ioctl(fd, NBD_CLEAR_SOCK); in nbd_disconnect()
491 int nbd_client(int fd) in nbd_client() argument
504 ioctl(fd, NBD_CLEAR_QUE); in nbd_client()
507 ioctl(fd, NBD_CLEAR_SOCK); in nbd_client()
519 int nbd_disconnect(int fd) in nbd_disconnect() argument
[all …]
H A Dos-posix.c286 int fd = 0; in os_setup_post() local
304 TFR(fd = qemu_open("/dev/null", O_RDWR)); in os_setup_post()
305 if (fd == -1) in os_setup_post()
313 dup2(fd, 0); in os_setup_post()
314 dup2(fd, 1); in os_setup_post()
315 dup2(fd, 2); in os_setup_post()
317 close(fd); in os_setup_post()
369 int fd; in qemu_create_pidfile() local
372 if (fd == -1) { in qemu_create_pidfile()
375 if (lockf(fd, F_TLOCK, 0) == -1) { in qemu_create_pidfile()
[all …]
/illumos-kvm-cmd/audio/
H A Dossaudio.c48 int fd; member
59 int fd; member
281 int fd; in oss_open() local
371 *pfd = fd; in oss_open()
523 int fd; in oss_init_out() local
527 oss->fd = -1; in oss_init_out()
568 fd, in oss_init_out()
621 oss->fd = fd; in oss_init_out()
689 int fd; in oss_init_in() local
693 oss->fd = -1; in oss_init_in()
[all …]
H A Desdaudio.c39 int fd; member
50 int fd; member
230 if (esd->fd < 0) { in qesd_init_out()
242 if (close (esd->fd)) { in qesd_init_out()
246 esd->fd = -1; in qesd_init_out()
264 if (esd->fd >= 0) { in qesd_fini_out()
268 esd->fd = -1; in qesd_fini_out()
437 if (esd->fd < 0) { in qesd_init_in()
453 esd->fd = -1; in qesd_init_in()
471 if (esd->fd >= 0) { in qesd_fini_in()
[all …]
/illumos-kvm-cmd/tests/
H A Dlinux-test.c76 int fd, i, len, ret; in test_file() local
115 chk_error(close(fd)); in test_file()
141 chk_error(close(fd)); in test_file()
171 chk_error(fstat(fd, &st)); in test_file()
172 chk_error(close(fd)); in test_file()
281 int val, fd; in server_socket() local
294 chk_error(listen(fd, 0)); in server_socket()
295 return fd; in server_socket()
301 int fd; in client_socket() local
310 return fd; in client_socket()
[all …]

Completed in 227 milliseconds

123456