Lines Matching refs:h

1197     struct handle *h;  in handle_open()  local
1212 h = malloc(sizeof(*h)); in handle_open()
1213 if (!h) { in handle_open()
1217 h->fd = open(path, req->flags); in handle_open()
1218 if (h->fd < 0) { in handle_open()
1219 free(h); in handle_open()
1222 out.fh = ptr_to_id(h); in handle_open()
1232 struct handle *h = id_to_ptr(req->fh); in handle_read() local
1244 h, h->fd, size, (uint64_t) offset); in handle_read()
1248 res = pread64(h->fd, read_buffer, size, offset); in handle_read()
1261 struct handle *h = id_to_ptr(req->fh); in handle_write() local
1271 h, h->fd, req->size, req->offset); in handle_write()
1272 res = pwrite64(h->fd, buffer, req->size, req->offset); in handle_write()
1316 struct handle *h = id_to_ptr(req->fh); in handle_release() local
1318 TRACE("[%d] RELEASE %p(%d)\n", handler->token, h, h->fd); in handle_release()
1319 close(h->fd); in handle_release()
1320 free(h); in handle_release()
1335 struct handle *h = id_to_ptr(req->fh); in handle_fsync() local
1336 fd = h->fd; in handle_fsync()
1362 struct dirhandle *h; in handle_opendir() local
1376 h = malloc(sizeof(*h)); in handle_opendir()
1377 if (!h) { in handle_opendir()
1381 h->d = opendir(path); in handle_opendir()
1382 if (!h->d) { in handle_opendir()
1383 free(h); in handle_opendir()
1386 out.fh = ptr_to_id(h); in handle_opendir()
1399 struct dirhandle *h = id_to_ptr(req->fh); in handle_readdir() local
1401 TRACE("[%d] READDIR %p\n", handler->token, h); in handle_readdir()
1405 rewinddir(h->d); in handle_readdir()
1407 de = readdir(h->d); in handle_readdir()
1425 struct dirhandle *h = id_to_ptr(req->fh); in handle_releasedir() local
1427 TRACE("[%d] RELEASEDIR %p\n", handler->token, h); in handle_releasedir()
1428 closedir(h->d); in handle_releasedir()
1429 free(h); in handle_releasedir()