suggest in the error message a possible cause: the size= attribute in
the metalog (if one is given) may be different from the source file's
actual size.
This is done by adding the general ability to stuff non-SUSP data into
the end of the System Use field of a Directory Record, which required
some amount of rewriting of the SUSP support. I think the result is
at least as good as what came before, and I've fixed at least one bug
along the way. Tested against RISC OS 3.70 on my Risc PC.
Oh, why do we want it? It should allow us to make acorn{26,32} CDs that
can be booted directly from RISC OS without mucking around copying the
bootloader to a native filing system.
the System Use field with fewer then 28 bytes to spare, we were
remembering the wrong length for the System Use field and hence
emitting a corrupt directory entry. This could be triggered by trying
to build a filesystem containing a regular file with a 120-byte name.
Now we're a little more careful.
Continuation Area, be sure to insert the "CE" record at the correct
point in the chain of SUSP records. Without this, makefs emits
an invalid image if any file needs a Continuation Area. The bug
seems to have been introduced with the conversion to TAILQs.
without supplying a value, complain at them instead of segfaulting.
Or, to put it another way, check that the value is non-NULL before calling
set_option().
Initialise memory before writing to only part of it,
making sure that the string is NUL-terminated
Allocate the maximum allowed length (including the
terminating NUL byte) for the temporary name string, make sure
the final output is NUL terminated, and copy back the NUL when
overwriting the previously created name (since maxlen is always
at least 1 less than ISO_FILENAME_MAXLENGTH_WITH_PADDING, this
is no problem)
Patches from Thorsten Glaser through freenode.net.
* Remove a few trailing whitespaces
* Rearrange and join to one #if for some headers
Patch contributed by Slava Semushin <slava.semushin@gmail.com>
in private mail.
bin/ls sources to libutil:
o Bump libutil minor version number
o Fix uses to include <util.h> to pick up the function definitions
o Fix most uses of flags_to_string() to release the now-malloc()ed result
implemented for du.c revision 1.25 :
Use open address hashtable with multiplicative double hash probing
and exponential hashtable growth for tracking previously seen inodes.
This replaces the O(n^2) behavior of linkchk() with an implementation
that should be O(n*logn)
Move an error check to the right place, and instead of blindly insisting on
an argument for all of "no-emul-boot", "no-boot", "hard-disk-boot" and
"boot-load-segment", only require it for the last one, which is the only
one that requires/uses it.
OK'd by Christos