-
Notifications
You must be signed in to change notification settings - Fork 15
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
High inode number result in a CPIOException #12
Comments
Who rules is the CPIO format, and the new ASCII header is used. In this format, each field is 8 byte ASCII, that is a 32 bit value. However, SWUpdate relies just on the size of the artifact, and the rest of fields like inode are ignored and they can be zeroed. Fields don't need to be checked, this is just to make them CPIO compliant. Instead of raising an exception, all fields but size could be zeroed. In case of size, the exception must remain, because at the moment there is no support for single artifact greater than 4GB due to this limitation. |
Sorry for the strange question, but I don't understand it right now. Why does the 8Byte ASCII value of the ascii_header ( https://github.com/sbabic/swupdate/blob/master/include/cpiohdr.h#L34-L50 ) not lead to a 64bit value? |
Because it is ASCII and not a BINARY. The format is "new ASCII", all fields are human readableA, but you need two bytes to represent a single byte. Just open the SWU and you see the reason. |
The inode value is saved in https://github.com/sbabic/swugenerator/blob/main/swugenerator/swu_file.py#L86 and checked in https://github.com/sbabic/swugenerator/blob/main/swugenerator/swu_file.py#L108-L116.
An inode is usually an unsigned 64 bit value. Here, however, it is checked for 32 bits (signed).
What exactly is the intention of this IF? Should all fields really be checked?
Accordingly, the script does not work on my XFS filesystem with high inode numbers.
thx
The text was updated successfully, but these errors were encountered: