[klibc] Re: [PATCH] gen_init_cpio uses external file list

Thayne Harbaugh tharbaugh at lnxi.com
Fri Sep 17 17:38:20 PDT 2004


On Fri, 2004-09-17 at 06:49 +0200, Sam Ravnborg wrote:
> On Thu, Sep 16, 2004 at 04:11:12PM -0600, Thayne Harbaugh wrote:
> > 
> > This patch makes gen_init_cpio generate the initramfs_data.cpio from a
> > file which contains a list of entries: file, dir, nod.  I swapped the
> > order of filename/location for the file arguments so that it would be
> > more uniform with the dir and nod tyes.
> 
> Comments already given on klibc list by others, but repeated for lkml readers.
> 
> Helper programs like this shall be compatible with at least solaris & cygwin.
> Therefore the linux only stuff needs to be avoided.

More correctly is GNU only stuff - but point taken.  _GNU_SOURCE
removed.

> Do we know that uid_t and gid_t equals an int here?
> Use an int in the sscanf and do explicit type conversion later.

fixed.

> fgets() please.

fixed - although it's not as clean and flexible as what was there
(although more portable).

This newer patch also adds skipping of comments (initiated with #) and
blank lines.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpio_list.3.patch
Type: text/x-patch
Size: 9015 bytes
Desc: not available
Url : http://www.zytor.com/pipermail/klibc/attachments/20040917/9892c306/cpio_list.3.bin


More information about the klibc mailing list