Lines Matching refs:h
1223 struct handle *h; in handle_open() local
1239 h = malloc(sizeof(*h)); in handle_open()
1240 if (!h) { in handle_open()
1244 h->fd = open(path, req->flags); in handle_open()
1245 if (h->fd < 0) { in handle_open()
1246 free(h); in handle_open()
1249 out.fh = ptr_to_id(h); in handle_open()
1259 struct handle *h = id_to_ptr(req->fh); in handle_read() local
1271 h, h->fd, size, (uint64_t) offset); in handle_read()
1275 res = pread64(h->fd, read_buffer, size, offset); in handle_read()
1288 struct handle *h = id_to_ptr(req->fh); in handle_write() local
1298 h, h->fd, req->size, req->offset); in handle_write()
1299 res = pwrite64(h->fd, buffer, req->size, req->offset); in handle_write()
1342 struct handle *h = id_to_ptr(req->fh); in handle_release() local
1344 TRACE("[%d] RELEASE %p(%d)\n", handler->token, h, h->fd); in handle_release()
1345 close(h->fd); in handle_release()
1346 free(h); in handle_release()
1361 struct handle *h = id_to_ptr(req->fh); in handle_fsync() local
1362 fd = h->fd; in handle_fsync()
1388 struct dirhandle *h; in handle_opendir() local
1402 h = malloc(sizeof(*h)); in handle_opendir()
1403 if (!h) { in handle_opendir()
1407 h->d = opendir(path); in handle_opendir()
1408 if (!h->d) { in handle_opendir()
1409 free(h); in handle_opendir()
1412 out.fh = ptr_to_id(h); in handle_opendir()
1425 struct dirhandle *h = id_to_ptr(req->fh); in handle_readdir() local
1427 TRACE("[%d] READDIR %p\n", handler->token, h); in handle_readdir()
1431 rewinddir(h->d); in handle_readdir()
1433 de = readdir(h->d); in handle_readdir()
1451 struct dirhandle *h = id_to_ptr(req->fh); in handle_releasedir() local
1453 TRACE("[%d] RELEASEDIR %p\n", handler->token, h); in handle_releasedir()
1454 closedir(h->d); in handle_releasedir()
1455 free(h); in handle_releasedir()