Decoupling Architectural-specific Code (#35)
[lunaix-os.git] / lunaix-os / includes / lunaix / fs / iso9660.h
index 96e73385df2afa89361066db9d70f4a7abc1ceba..6fbdbbca71ee6efff2819956094e152ac05cd2c9 100644 (file)
 #define ISO_SIGNATURE_HI 0x31
 
 // Volume Types
-#define ISO_VOLBOOT 0     // Boot Record
-#define ISO_VOLPRIM 1     // Primary
-#define ISO_VOLSUPP 2     // Supplementary
-#define ISO_VOLPART 3     // Partition
-#define ISO_VOLTERM 255   // Volume descriptor set terminator
+#define ISO_VOLBOOT 0   // Boot Record
+#define ISO_VOLPRIM 1   // Primary
+#define ISO_VOLSUPP 2   // Supplementary
+#define ISO_VOLPART 3   // Partition
+#define ISO_VOLTERM 255 // Volume descriptor set terminator
 
 #define ISO_FHIDDEN 0x1   // a hidden file
 #define ISO_FDIR 0x2      // a directory file
@@ -154,10 +154,10 @@ struct iso_drecord
     u8_t xattr_len;
     iso_bbo32_t extent_addr;
     iso_bbo32_t data_size;
-    struct iso_datetime2 PACKED mktime; // Time the record is made, see 9.1.5
+    struct iso_datetime2 mktime; // Time the record is made, see 9.1.5
     u8_t flags;
-    u8_t fu_sz;                         // size of file unit (FU)
-    u8_t gap_sz;                        // size of gap if FU is interleaved.
+    u8_t fu_sz;  // size of file unit (FU)
+    u8_t gap_sz; // size of gap if FU is interleaved.
     iso_bbo16_t vol_seq;
     struct iso_var_mdu name;
 } PACKED;
@@ -340,6 +340,12 @@ iso9660_read(struct v_inode* inode, void* buffer, size_t len, size_t fpos);
 int
 iso9660_write(struct v_inode* inode, void* buffer, size_t len, size_t fpos);
 
+int
+iso9660_read_page(struct v_inode* inode, void* buffer, size_t fpos);
+
+int
+iso9660_write_page(struct v_inode* inode, void* buffer, size_t fpos);
+
 int
 iso9660_seek(struct v_inode* inode, size_t offset);