Age | Commit message (Collapse) | Author |
|
|
|
own memory (instead of using toybuf), use perror_msg() instead of lower level verror_msg() (which is really an internal function needed to implement perror_msg()), don't set execute bits on created archive.
|
|
-iot combinations, move loopfiles_stdin() down after write_cpio_member() so we can hardwire it instead of using a function pointer that only ever has one value.
|
|
|
|
&3, turn a switch/case into if/else.
|
|
(Really, checking the original file date is the Right Thing, but I
haven't written it yet.)
|
|
I've reduced the use of malloc(), dropped an extra function call, and
-at least in theory- allowed proper handling of non-regular files.
(If we have a file we can't read, we still should record it when it's
of a type where file content is ignored).
|
|
This version can archive and extract directories, sockets, FIFOs, devices,
symlinks, and regular files.
Supported options are -iot, -H FMT (which is a dummy right now).
It only writes newc, and could read newc or newcrc.
This does NOT implement -d, which essentially is equivalent to
mkdir -p $(dirname $FILE)
for every file that needs it.
Hard links are not supported, though it would be easy to add them given
a hash table or something like that.
I also have not implemented the "<n> blocks" output on stderr.
If desired, I can add it pretty simply.
There is one assumption this makes: that the mode of a file, as mode_t,
is bitwise equivalent to the mode as defined for the cpio format.
This is true of Linux, but is not mandated by POSIX.
If it is compiled for a system where that is false, the archives will
not be portable.
|