@@ -22,7 +22,7 @@ use crate::kind::Kind;
2222use crate :: kinds:: LE_V4_0 ;
2323use crate :: metadata:: { self , MetadataWriter , METADATA_MAXSIZE } ;
2424use crate :: reader:: WriteSeek ;
25- use crate :: squashfs:: { Flags , SuperBlock } ;
25+ use crate :: squashfs:: { Flags , SuperBlock , SuperBlock_V4_0 } ;
2626use crate :: {
2727 fragment, FilesystemReader , Node , NodeHeader , SquashfsBlockDevice , SquashfsCharacterDevice ,
2828 SquashfsDir , SquashfsFileWriter , DEFAULT_BLOCK_SIZE , DEFAULT_PAD_LEN , MAX_BLOCK_SIZE ,
@@ -416,7 +416,7 @@ impl<'a> FilesystemWriter<'a> {
416416 & mut self ,
417417 w : & mut W ,
418418 offset : u64 ,
419- ) -> Result < ( SuperBlock , u64 ) , BackhandError > {
419+ ) -> Result < ( SuperBlock_V4_0 , u64 ) , BackhandError > {
420420 let mut writer = WriterWithOffset :: new ( w, offset) ?;
421421 self . write ( & mut writer)
422422 }
@@ -476,7 +476,7 @@ impl<'a> FilesystemWriter<'a> {
476476 dir_writer : & ' _ mut MetadataWriter ,
477477 parent_node_id : u32 ,
478478 node_id : NonZeroUsize ,
479- superblock : & SuperBlock ,
479+ superblock : & SuperBlock_V4_0 ,
480480 kind : & Kind ,
481481 ) -> Result < Entry < ' b > , BackhandError > {
482482 let node = & self . root . node ( node_id) . unwrap ( ) ;
@@ -596,8 +596,9 @@ impl<'a> FilesystemWriter<'a> {
596596 pub fn write < W : Write + Seek > (
597597 & mut self ,
598598 w : & mut W ,
599- ) -> Result < ( SuperBlock , u64 ) , BackhandError > {
600- let mut superblock = SuperBlock :: new (
599+ ) -> Result < ( SuperBlock_V4_0 , u64 ) , BackhandError > {
600+ // TODO: support v3
601+ let mut superblock = SuperBlock_V4_0 :: new (
601602 self . fs_compressor . id ,
602603 Kind {
603604 inner : self . kind . inner . clone ( ) ,
@@ -709,7 +710,7 @@ impl<'a> FilesystemWriter<'a> {
709710 fn finalize < W : Write + Seek > (
710711 & self ,
711712 w : & mut W ,
712- superblock : & mut SuperBlock ,
713+ superblock : & mut SuperBlock_V4_0 ,
713714 ) -> Result < u64 , BackhandError > {
714715 superblock. bytes_used = w. stream_position ( ) ?;
715716
0 commit comments