src/dbfs/dirop.c
changeset 30 d8fabd347a8e
parent 29 5de62ca9a5aa
child 33 c71f3053c714
equal deleted inserted replaced
29:5de62ca9a5aa 30:d8fabd347a8e
   226  *
   226  *
   227  * If trans failed earlier, detect that and return an error.
   227  * If trans failed earlier, detect that and return an error.
   228  */
   228  */
   229 void dbfs_readdir (struct fuse_req *req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi) {
   229 void dbfs_readdir (struct fuse_req *req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi) {
   230     struct dbfs *ctx = fuse_req_userdata(req);
   230     struct dbfs *ctx = fuse_req_userdata(req);
   231     struct dbfs_dirop *dirop = (struct dbfs_dirop *) fi->fh;
   231     struct dbfs_dirop *dirop;
   232     int err;
   232     int err;
   233 
   233 
   234     // get the op
   234     // get the op
   235     if ((dirop = (struct dbfs_dirop *) dbfs_op_req(req, ino, fi)) == NULL)
   235     if ((dirop = (struct dbfs_dirop *) dbfs_op_req(req, ino, fi)) == NULL)
   236         SERROR(err = EIO);
   236         return;
   237     
   237     
   238     INFO("[dbfs.readdir %p:%p] ino=%lu, size=%zu, off=%zu, fi=%p : trans=%p", dirop, req, ino, size, off, fi, dirop->base.trans);
   238     INFO("[dbfs.readdir %p:%p] ino=%lu, size=%zu, off=%zu, fi=%p : trans=%p", dirop, req, ino, size, off, fi, dirop->base.trans);
   239 
   239 
   240     // create the dirbuf
   240     // create the dirbuf
   241     if (dirbuf_init(&dirop->dirbuf, size, off))
   241     if (dirbuf_init(&dirop->dirbuf, size, off))