Lines Matching refs:fd
114 int extra, fd; in file_removed() local
132 fd = os_open_file(host_file, of_read(OPENFLAGS()), 0); in file_removed()
134 if (fd > 0) { in file_removed()
135 os_close_file(fd); in file_removed()
199 static ssize_t hppfs_read_file(int fd, char __user *buf, ssize_t count) in hppfs_read_file() argument
214 err = os_read_file(fd, new_buf, cur); in hppfs_read_file()
299 int fd; in open_host_sock() local
304 fd = os_connect_socket(host_file); in open_host_sock()
305 if (fd > 0) in open_host_sock()
306 return fd; in open_host_sock()
310 fd = os_connect_socket(host_file); in open_host_sock()
311 return fd; in open_host_sock()
329 static struct hppfs_data *hppfs_get_data(int fd, int filter, in hppfs_get_data() argument
352 os_write_file(fd, data->contents, n); in hppfs_get_data()
353 err = os_shutdown_socket(fd, 0, 1); in hppfs_get_data()
361 n = os_read_file(fd, data->contents, sizeof(data->contents)); in hppfs_get_data()
426 int err, fd, type, filter; in hppfs_open() local
447 fd = os_open_file(host_file, of_read(OPENFLAGS()), 0); in hppfs_open()
448 if (fd >= 0) in hppfs_open()
449 data->host_fd = fd; in hppfs_open()
452 "errno = %d\n", host_file, -fd); in hppfs_open()
456 fd = open_host_sock(host_file, &filter); in hppfs_open()
457 if (fd > 0) { in hppfs_open()
458 data->contents = hppfs_get_data(fd, filter, in hppfs_open()
462 data->host_fd = fd; in hppfs_open()
465 "in '%s', errno = %d\n", host_file, -fd); in hppfs_open()