feat: fstat now handle symbolic link
[lunaix-os.git] / lunaix-os / kernel / fs / iso9660 / mount.c
index 35ebb4b3d53bc8219e909f27bee4f82e37fda265..25150e5efe990aa73807f0f885c7bda9bc8d822c 100644 (file)
@@ -27,7 +27,7 @@ iso9660_mount(struct v_superblock* vsb, struct v_dnode* mount_point)
     u32_t lba = 16;
     int errno = 0;
     do {
     u32_t lba = 16;
     int errno = 0;
     do {
-        errno = dev->read(dev, vdesc, ISO9660_BLKSZ * lba, ISO9660_BLKSZ);
+        errno = dev->ops.read(dev, vdesc, ISO9660_BLKSZ * lba, ISO9660_BLKSZ);
         if (errno < 0) {
             errno = EIO;
             goto done;
         if (errno < 0) {
             errno = EIO;
             goto done;
@@ -55,6 +55,7 @@ iso9660_mount(struct v_superblock* vsb, struct v_dnode* mount_point)
     vsb->data = isovsb;
     vsb->ops.init_inode = iso9660_init_inode;
     vsb->ops.read_capacity = iso9660_rd_capacity;
     vsb->data = isovsb;
     vsb->ops.init_inode = iso9660_init_inode;
     vsb->ops.read_capacity = iso9660_rd_capacity;
+    vsb->blksize = ISO9660_BLKSZ;
 
     struct v_inode* rootino = vfs_i_alloc(vsb);
     struct iso_var_mdu* mdu = (struct iso_var_mdu*)vprim->root_record;
 
     struct v_inode* rootino = vfs_i_alloc(vsb);
     struct iso_var_mdu* mdu = (struct iso_var_mdu*)vprim->root_record;
@@ -93,6 +94,8 @@ int
 iso9660_unmount(struct v_superblock* vsb)
 {
     vfree(vsb->data);
 iso9660_unmount(struct v_superblock* vsb)
 {
     vfree(vsb->data);
+
+    return 0;
 }
 
 void
 }
 
 void
@@ -107,4 +110,5 @@ iso9660_init()
     fs->unmount = iso9660_unmount;
 
     fsm_register(fs);
     fs->unmount = iso9660_unmount;
 
     fsm_register(fs);
-}
\ No newline at end of file
+}
+EXPORT_FILE_SYSTEM(iso9660, iso9660_init);
\ No newline at end of file