Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

squashfs support for uuid and label #264

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
factor out superblock byte counting
In preparation for an extra_info block after the compressor
options.
Brian Carnes committed Sep 6, 2023
commit a4eee12cde0bb6e08a6cf801f87a738c9ecab133
14 changes: 6 additions & 8 deletions squashfs-tools/mksquashfs.c
Original file line number Diff line number Diff line change
@@ -7569,6 +7569,7 @@ int sqfstar(int argc, char *argv[])
SQUASHFS_MAJOR, SQUASHFS_MINOR,
destination_file, block_size);

bytes = sizeof(struct squashfs_super_block);
/*
* store any compressor specific options after the superblock,
* and set the COMP_OPT flag to show that the filesystem has
@@ -7582,11 +7583,9 @@ int sqfstar(int argc, char *argv[])
sizeof(c_byte), &c_byte);
write_destination(fd, sizeof(struct squashfs_super_block) +
sizeof(c_byte), size, comp_data);
bytes = sizeof(struct squashfs_super_block) + sizeof(c_byte)
+ size;
bytes += sizeof(c_byte) + size;
comp_opts = TRUE;
} else
bytes = sizeof(struct squashfs_super_block);
}

if(path)
paths = add_subdir(paths, path);
@@ -8703,6 +8702,7 @@ int main(int argc, char *argv[])
SQUASHFS_MAJOR, SQUASHFS_MINOR,
destination_file, block_size);

bytes = sizeof(struct squashfs_super_block);
/*
* store any compressor specific options after the superblock,
* and set the COMP_OPT flag to show that the filesystem has
@@ -8716,11 +8716,9 @@ int main(int argc, char *argv[])
sizeof(c_byte), &c_byte);
write_destination(fd, sizeof(struct squashfs_super_block) +
sizeof(c_byte), size, comp_data);
bytes = sizeof(struct squashfs_super_block) + sizeof(c_byte)
+ size;
bytes += sizeof(c_byte) + size;
comp_opts = TRUE;
} else
bytes = sizeof(struct squashfs_super_block);
}
} else {
unsigned int last_directory_block, inode_dir_file_size,
root_inode_size, inode_dir_start_block,