refactor: replace all stdint::uint32_t into short and more manageable u32_t
[lunaix-os.git] / lunaix-os / kernel / fs / iso9660 / inode.c
index 31f85cea173bdc1e4a539040809afc6b47522904..e5649106e46d920cf391de660ddb33d2c37ba0f1 100644 (file)
@@ -11,7 +11,9 @@ static struct v_inode_ops iso_inode_ops = {
 
 static struct v_file_ops iso_file_ops = { .close = iso9660_close,
                                           .read = iso9660_read,
+                                          .read_page = iso9660_read,
                                           .write = iso9660_write,
+                                          .write_page = iso9660_write,
                                           .seek = iso9660_seek,
                                           .readdir = iso9660_readdir };
 
@@ -60,13 +62,18 @@ iso9660_fill_inode(struct v_inode* inode, struct iso_drecache* dir, int ino)
             return EIO;
         }
         isoino->record_fmt = xattr->record_fmt;
-        isoino->ctime = iso9660_dt2unix(&xattr->ctime);
-        isoino->mtime = iso9660_dt2unix(&xattr->mtime);
+
+        inode->ctime = iso9660_dt2unix(&xattr->ctime);
+        inode->mtime = iso9660_dt2unix(&xattr->mtime);
 
         inode->lb_addr += dir->xattr_len * dir->fu_size;
 
         vfree(xattr);
     }
 
+    inode->ctime = dir->ctime ? dir->ctime : inode->ctime;
+    inode->mtime = dir->mtime ? dir->mtime : inode->mtime;
+    inode->atime = dir->atime ? dir->atime : inode->atime;
+
     return 0;
 }
\ No newline at end of file