Lines Matching refs:nbd
42 int sock = -1, nbd, flags; in nbd_client_main() local
49 nbd = xopen(device, O_RDWR); in nbd_client_main()
68 ioctl(nbd, NBD_SET_BLKSIZE, 4096); in nbd_client_main()
69 ioctl(nbd, NBD_SET_SIZE_BLOCKS, devsize/4096); in nbd_client_main()
70 ioctl(nbd, NBD_CLEAR_SOCK); in nbd_client_main()
74 xioctl(nbd, BLKROSET, &temp); in nbd_client_main()
76 if (timeout && ioctl(nbd, NBD_SET_TIMEOUT, timeout)<0) break; in nbd_client_main()
77 if (ioctl(nbd, NBD_SET_SOCK, sock) < 0) break; in nbd_client_main()
106 if (ioctl(nbd, NBD_DO_IT)>=0 || errno==EBADR) break; in nbd_client_main()
111 ioctl(nbd, NBD_CLEAR_QUE); in nbd_client_main()
112 ioctl(nbd, NBD_CLEAR_SOCK); in nbd_client_main()
113 if (CFG_TOYBOX_FREE) close(nbd); in nbd_client_main()