Lines Matching refs:h

1178     struct handle *h;  in handle_open()  local
1193 h = malloc(sizeof(*h)); in handle_open()
1194 if (!h) { in handle_open()
1198 h->fd = open(path, req->flags); in handle_open()
1199 if (h->fd < 0) { in handle_open()
1200 free(h); in handle_open()
1203 out.fh = ptr_to_id(h); in handle_open()
1213 struct handle *h = id_to_ptr(req->fh); in handle_read() local
1225 h, h->fd, size, (uint64_t) offset); in handle_read()
1229 res = pread64(h->fd, read_buffer, size, offset); in handle_read()
1242 struct handle *h = id_to_ptr(req->fh); in handle_write() local
1252 h, h->fd, req->size, req->offset); in handle_write()
1253 res = pwrite64(h->fd, buffer, req->size, req->offset); in handle_write()
1297 struct handle *h = id_to_ptr(req->fh); in handle_release() local
1299 TRACE("[%d] RELEASE %p(%d)\n", handler->token, h, h->fd); in handle_release()
1300 close(h->fd); in handle_release()
1301 free(h); in handle_release()
1316 struct handle *h = id_to_ptr(req->fh); in handle_fsync() local
1317 fd = h->fd; in handle_fsync()
1343 struct dirhandle *h; in handle_opendir() local
1357 h = malloc(sizeof(*h)); in handle_opendir()
1358 if (!h) { in handle_opendir()
1362 h->d = opendir(path); in handle_opendir()
1363 if (!h->d) { in handle_opendir()
1364 free(h); in handle_opendir()
1367 out.fh = ptr_to_id(h); in handle_opendir()
1380 struct dirhandle *h = id_to_ptr(req->fh); in handle_readdir() local
1382 TRACE("[%d] READDIR %p\n", handler->token, h); in handle_readdir()
1386 rewinddir(h->d); in handle_readdir()
1388 de = readdir(h->d); in handle_readdir()
1406 struct dirhandle *h = id_to_ptr(req->fh); in handle_releasedir() local
1408 TRACE("[%d] RELEASEDIR %p\n", handler->token, h); in handle_releasedir()
1409 closedir(h->d); in handle_releasedir()
1410 free(h); in handle_releasedir()