Lines Matching refs:fd
111 int extra, fd; in file_removed() local
129 fd = os_open_file(host_file, of_read(OPENFLAGS()), 0); in file_removed()
131 if (fd > 0) { in file_removed()
132 os_close_file(fd); in file_removed()
211 static ssize_t hppfs_read_file(int fd, char __user *buf, ssize_t count) in hppfs_read_file() argument
226 err = os_read_file(fd, new_buf, cur); in hppfs_read_file()
306 int fd; in open_host_sock() local
311 fd = os_connect_socket(host_file); in open_host_sock()
312 if (fd > 0) in open_host_sock()
313 return fd; in open_host_sock()
317 fd = os_connect_socket(host_file); in open_host_sock()
318 return fd; in open_host_sock()
336 static struct hppfs_data *hppfs_get_data(int fd, int filter, in hppfs_get_data() argument
359 os_write_file(fd, data->contents, n); in hppfs_get_data()
360 err = os_shutdown_socket(fd, 0, 1); in hppfs_get_data()
368 n = os_read_file(fd, data->contents, sizeof(data->contents)); in hppfs_get_data()
434 int err, fd, type, filter; in hppfs_open() local
457 fd = os_open_file(host_file, of_read(OPENFLAGS()), 0); in hppfs_open()
458 if (fd >= 0) in hppfs_open()
459 data->host_fd = fd; in hppfs_open()
462 "errno = %d\n", host_file, -fd); in hppfs_open()
466 fd = open_host_sock(host_file, &filter); in hppfs_open()
467 if (fd > 0) { in hppfs_open()
468 data->contents = hppfs_get_data(fd, filter, in hppfs_open()
472 data->host_fd = fd; in hppfs_open()
475 "in '%s', errno = %d\n", host_file, -fd); in hppfs_open()