Lines Matching refs:fd
51 int ret, fd = open(dir, O_RDONLY); in vss_do_freeze() local
53 if (fd < 0) in vss_do_freeze()
56 ret = ioctl(fd, cmd, 0); in vss_do_freeze()
70 close(fd); in vss_do_freeze()
75 close(fd); in vss_do_freeze()
146 static int netlink_send(int fd, struct cn_msg *msg) in netlink_send() argument
170 return sendmsg(fd, &message, 0); in netlink_send()
183 int fd, len, nl_group; in main() local
227 fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); in main()
228 if (fd < 0) { in main()
239 error = bind(fd, (struct sockaddr *)&addr, sizeof(addr)); in main()
242 close(fd); in main()
246 if (setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &nl_group, sizeof(nl_group)) < 0) { in main()
248 close(fd); in main()
263 len = netlink_send(fd, message); in main()
266 close(fd); in main()
270 pfd.fd = fd; in main()
281 close(fd); in main()
288 len = recvfrom(fd, vss_recv_buffer, vss_recv_buffer_len, 0, in main()
294 close(fd); in main()
334 len = netlink_send(fd, incoming_cn_msg); in main()