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

isoSize issue #5

Open
AndrewDDavis opened this issue Sep 21, 2023 · 1 comment
Open

isoSize issue #5

AndrewDDavis opened this issue Sep 21, 2023 · 1 comment

Comments

@AndrewDDavis
Copy link

About the isoSize calculation: lines 114 to 122.

stat returns the file size in bytes, whereas fdisk wants sectors. You have the debug line in there to multiply by 2 on line 122, so that with the truncation on line 116 (division by 1000), the effect is a division by 500.

So, we're assuming the flash drive target uses 512 byte sectors, and it all works out, but if you want to clean it up and make the code more transparent to a reader, those 8 lines could be replaced by something like:

# get iso size, pad by 10%, and convert to 512B sectors
isoSize=$(stat -c%s "$isofn")     # in bytes
isoSize=$(($isoSize*110/100/512))
echo $isoSize
@RoiArthurB
Copy link
Owner

Hey @AndrewDDavis ,

I really appreciate your enthusiasm for this project, but I've moved on and don't have any plans to maintain it anymore.

Feel free to fork the project and take it in any direction you'd like! :)

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