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

Why is the compressed bit being set in inode headers when its size is 0? #134

Closed
mgord9518 opened this issue Apr 27, 2024 · 3 comments
Closed

Comments

@mgord9518
Copy link
Contributor

I've been reading through SquashFS documentation and I've been unable to find anything indicating that the compressed bit should be set if the size is 0, what is the purpose of this code?

squashfuse/fs.c

Lines 137 to 138 in 94f998c

if (!*size)
*size = SQUASHFS_COMPRESSED_BIT;

@vasi
Copy link
Owner

vasi commented Apr 30, 2024

I don't know why it's not documented, but it's what the kernel does: https://github.com/torvalds/linux/blob/50dffbf771802c4db88de2cb942affa0ada43ad0/fs/squashfs/squashfs_fs.h#L108

@vasi vasi closed this as completed Apr 30, 2024
@mgord9518
Copy link
Contributor Author

@vasi I asked the author of SquashFS, apparently it only pertains to SquashFS 1.0 so it should be safe to remove

@vasi
Copy link
Owner

vasi commented May 2, 2024

Oh nice, thanks for the followup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants