| Age | Commit message (Collapse) | Author |
|
properly verify the value of the arguments, with
asserts.
add simpler runtime checks in-function, on prw,
rw_file_once and rw_file_exact.
variable names in english now, and the code is
cleaner, while being functionally equivalent.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
useless check. will never be true.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
itt's totally obvious
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
when i removed arc4random integration, i forgot
to change this line back. oops!
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
i was editting this in another editor
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
only use the old fallback, or /dev/urandom
/dev/random blocks on some older unix machines,
or in embedded environments that may never
have enough entropy, causing the code to hang.
urandom is most certainly expected to exist on
pretty much anything since the mid 90s.
i could probably re-add the arc4random setup
for BSDs. i'll think about it. gotta do that
portably too.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
if someone calls rhex fast enough, the timestamp
may not change. this mitigates that by adding
a counter value to the mix
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
used when a random device isn't available, on old
unix, or on certain chroot environments.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
one for directory, then copy the binary
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
forgot to include the binary in the path
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
may break modern systems. and all old systems that
i care about will handle errno just fine.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
-p isn't portable
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
yeah, why not use a tool that's been around since the
80s?
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
also support LDFLAGS
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
forgot this. oops
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
disable random mac address generation on really old
operating systems.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
using a special leah-only technique
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
subtract and add iteratively
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
accidentally removed it during re-factor
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
skip it if there is a valid checksum, to mitigate
erroneous errno state upon exit from run_cmd(),
because we can assume by this point that we
are in fact ready to write at this point.
the check at the end still exists, which will catch
any error set by write, and any error set before
that. this fixes a weird warning on cmd_dump.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
reset it in callers instead.
this means that the main function is more generalised.
we know by the time we exit that there is no error.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|