2004-11-12 20:38:49

by Thayne Harbaugh

[permalink] [raw]
Subject: [PATCH] gen_init_cpio-slink_pipe_sock

This patch makes gen_init_cpio more complete by adding symlink, pipe and
socket support. It updates scripts/gen_initramfs_list.sh to support the
new types. The patch applies to the recent mm series that already have
the updated gen_init_cpio and gen_initramfs_list.sh.


--
Thayne Harbaugh
Linux Networx


Attachments:
gen_init_cpio-slink_pipe_sock.patch (9.55 kB)

2004-11-12 20:45:25

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] gen_init_cpio-slink_pipe_sock

Thayne Harbaugh wrote:
> diff -ur linux-2.6.10-rc1.orig/drivers/block/Kconfig linux-2.6.10-rc1/drivers/block/Kconfig
> --- linux-2.6.10-rc1.orig/drivers/block/Kconfig 2004-11-12 11:03:52.657108248 -0700
> +++ linux-2.6.10-rc1/drivers/block/Kconfig 2004-11-12 11:07:28.458301480 -0700
> @@ -363,10 +363,14 @@
> file <name> <location> <mode> <uid> <gid>
> dir <name> <mode> <uid> <gid>
> nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>
> + slink <name> <target> <mode> <uid> <gid>
> + pipe <name> <mode> <uid> <gid>
> + sock <name> <mode> <uid> <gid>
>
> Where:
> - <name> name of the file/dir/nod in the archive
> + <name> name of the file/dir/nod/etc in the archive
> <location> location of the file in the current filesystem
> + <target> link target
> <mode> mode/permissions of the file
> <uid> user id (0=root)
> <gid> group id (0=root)

This info should get moved out of Kconfig, and into a Documentation/*
text file somewhere.



> +/*
> + * Original work by Jeff Garzick

Please spell my last name correctly :)

2004-11-12 20:50:49

by Thayne Harbaugh

[permalink] [raw]
Subject: Re: [PATCH] gen_init_cpio-slink_pipe_sock

On Fri, 2004-11-12 at 15:42 -0500, Jeff Garzik wrote:
> Thayne Harbaugh wrote:
> > diff -ur linux-2.6.10-rc1.orig/drivers/block/Kconfig linux-2.6.10-rc1/drivers/block/Kconfig
> > --- linux-2.6.10-rc1.orig/drivers/block/Kconfig 2004-11-12 11:03:52.657108248 -0700
> > +++ linux-2.6.10-rc1/drivers/block/Kconfig 2004-11-12 11:07:28.458301480 -0700
> > @@ -363,10 +363,14 @@
> > file <name> <location> <mode> <uid> <gid>
> > dir <name> <mode> <uid> <gid>
> > nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>
> > + slink <name> <target> <mode> <uid> <gid>
> > + pipe <name> <mode> <uid> <gid>
> > + sock <name> <mode> <uid> <gid>
> >
> > Where:
> > - <name> name of the file/dir/nod in the archive
> > + <name> name of the file/dir/nod/etc in the archive
> > <location> location of the file in the current filesystem
> > + <target> link target
> > <mode> mode/permissions of the file
> > <uid> user id (0=root)
> > <gid> group id (0=root)
>
> This info should get moved out of Kconfig, and into a Documentation/*
> text file somewhere.

It's actually redundant with the gen_init_cpio help output. It could be
removed from the Kconfig and put in Documentation/early-userspace/README
if someone still wants it someplace other than the gen_init_cpio help
output.

> > +/*
> > + * Original work by Jeff Garzick
>
> Please spell my last name correctly :)

I did - you're the one that spells it incorrectly! B^)

Makes me wonder how I got your email correct since I typed that from
memory . . ..

--
Thayne Harbaugh
Linux Networx

2004-11-15 15:28:54

by Thayne Harbaugh

[permalink] [raw]
Subject: Re: [PATCH] gen_init_cpio-slink_pipe_sock

I didn't see any comments other than these by Jeff. Here's a new patch
with the following modifications:

On Fri, 2004-11-12 at 15:42 -0500, Jeff Garzik wrote:
> Thayne Harbaugh wrote:
> > diff -ur linux-2.6.10-rc1.orig/drivers/block/Kconfig linux-2.6.10-rc1/drivers/block/Kconfig
> > --- linux-2.6.10-rc1.orig/drivers/block/Kconfig 2004-11-12 11:03:52.657108248 -0700
> > +++ linux-2.6.10-rc1/drivers/block/Kconfig 2004-11-12 11:07:28.458301480 -0700
> > @@ -363,10 +363,14 @@
> > file <name> <location> <mode> <uid> <gid>
> > dir <name> <mode> <uid> <gid>
> > nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>
> > + slink <name> <target> <mode> <uid> <gid>
> > + pipe <name> <mode> <uid> <gid>
> > + sock <name> <mode> <uid> <gid>
> >
> > Where:
> > - <name> name of the file/dir/nod in the archive
> > + <name> name of the file/dir/nod/etc in the archive
> > <location> location of the file in the current filesystem
> > + <target> link target
> > <mode> mode/permissions of the file
> > <uid> user id (0=root)
> > <gid> group id (0=root)
>
> This info should get moved out of Kconfig, and into a Documentation/*
> text file somewhere.

Now Kconfig and Documentation/early-userspace/README reference the usage
output of usr/gen_init_cpio instead of reproducing the file format
information. This way there is no redundant information that gets out
of synch. The drawback is that usr/gen_init_cpio has to be built before
it can be run to obtain the usage information.

> > +/*
> > + * Original work by Jeff Garzick
>
> Please spell my last name correctly :)

Jeff refused to change his name to my new spelling so I have reluctantly
altered the comment so that it reads "Original work by Jeff
Garzik" (sic.). :)

--
Thayne Harbaugh
Linux Networx


Attachments:
gen_init_cpio-slink_pipe_sock_2.patch (9.93 kB)