Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-12-08 | util/nvmutil: consistent parentheses on comparison | Leah Rowe | |
2022-12-08 | util/nvmutil file reads: skip reading if errno!=0 | Leah Rowe | |
*This condition will probably never be met, but it is theoretically possible that the code could still fail at this point. Catch all errors, and exit, ruthlessly. | |||
2022-12-08 | util/nvmutil: return error when fstat() is -1 | Leah Rowe | |
Another oversight in my error handling. | |||
2022-12-07 | util/nvmutil: rhex(): fail if errno not zero | Leah Rowe | |
The code was only checking whether all of the bytes were read, but there are other errors that can be caught via errno. Enforce strict errno handling, when generating random numbers for command `setmac`. | |||
2022-12-05 | util/nvmutil: minor code formatting cleanup | Leah Rowe | |
2022-12-03 | util/nvmutil: remove errant line break | Leah Rowe | |
2022-12-03 | util/nvmutil: missing paretheses on if statement | Leah Rowe | |
2022-12-03 | util/nvmutil: don't initialise rbuf unless needed | Leah Rowe | |
previously, it was always initialised, but now it's only initialised if '?' is used on a mac address character in command `setmac` this is done by simply moving mac address character randomisation to a separate function | |||
2022-12-03 | util/nvmutil: rename variable in hextonum | Leah Rowe | |
2022-12-03 | util/nvmutil: don't reallocate memory in hextonum | Leah Rowe | |
2022-12-03 | util/nvmutil: dont report bad size if /dev/urandom | Leah Rowe | |
2022-12-03 | util/nvmutil: rename variables in hextonum | Leah Rowe | |
2022-12-03 | util/nvmutil: use BUFSIZ for rmac size in hextonum | Leah Rowe | |
I will be using this function elsewhere, and in general I want this to be usable for lots of programs. | |||
2022-12-03 | util/nvtutil: fix out of bounds error | Leah Rowe | |
the error would have never been triggered, because it never went over 11, but if this code were to be copied elsewhere, it would be problematic | |||
2022-12-01 | util/nvmutil: reset errno on cmd_swap | Leah Rowe | |
If one of the checksums was valid, but the other was not, errno would be set to E_CANCELED, but then the buffer would be modified anyway; this is acceptable behaviour, and errno would later be reset writing the GBE file, which is done only on the condition that the buffer was modified, but it's also a good idea to reset it here just in case. This is not a bugfix, and no behavioural changes will be observed by the user, but this may *prevent* a bug in the future, so let's pre-fix that bug now. | |||
2022-11-27 | util/nvmutil: mild refactoring | Leah Rowe | |
2022-11-27 | util/nvmutil: improved errno handling in main | Leah Rowe | |
2022-11-27 | util/nvmutil: put hextonum in its own function | Leah Rowe | |
2022-11-27 | util/nvmutil: move ENOTDIR check to function | Leah Rowe | |
2022-11-27 | util/nvmutil: further improved errno handling | Leah Rowe | |
2022-11-27 | util/nvmutil: remove errant code | Leah Rowe | |
2022-11-27 | util/nvmutil: improved error handling | Leah Rowe | |
2022-11-26 | util/nvmutil: fix off by one bug | Leah Rowe | |
2022-11-26 | nvmutil copy/swap: actually set nvmPartModified | Leah Rowe | |
2022-11-26 | util/nvmutil: move cmd copy to own function | Leah Rowe | |
2022-11-26 | util/nvmutil: move cmd swap to own function | Leah Rowe | |
2022-11-26 | util/nvmutil: move cmd brick to own function | Leah Rowe | |
2022-11-26 | util/nvmutil: cmd setchecksum in own function | Leah Rowe | |
2022-11-26 | util/nvmutil: split "dump" into smaller functions | Leah Rowe | |
2022-11-26 | util/nvmutil: re-factor to reduce code indentation | Leah Rowe | |
2022-11-26 | util/nvmutil: write gbe files in a function | Leah Rowe | |
in any C program, main() should not contain detailed logic. ideally, the main() function should only be a skeleton, showing the overall logic flow of the program. split writing gbe files into a separate function, to satisfy this criteria. | |||
2022-11-26 | util/nvmutil: human-friendly exit messages, part 2 | Leah Rowe | |
2022-11-18 | util/nvmutil: more human-friendly exit messages | Leah Rowe | |
2022-11-17 | assimilate nvmutil | Leah Rowe | |