* [RFC] e2fsprogs/mke2fs: add an option "-d root-directory"
@ 2013-08-05 8:40 Robert Yang
2013-08-05 15:17 ` Darren Hart
0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2013-08-05 8:40 UTC (permalink / raw)
To: linux-ext4; +Cc: Darren Hart, Theodore Ts'o
Hello folks,
I'd like to add an "-d root-directory" option for mke2fs, which is used
for adding files from the "root-directory" to the filesystem after the
formatting, it is similar to genext2fs, but which only supports ext2 AFAIK.
it's usage example would be:
$ mke2fs -t extX -d <dir> <device>
I've done a few work on it, we can re-use the code from debugfs/debugfs.c,
here are the draft implementation thoughts:
Move a part of the code from debugfs/debugfs.c to misc/util.c, for example,
we will change the function do_write() in debugfs.c to:
void do_write(int argc, char *argv[])
{
[snip];
retval = do_write_internal();
[snip];
}
The do_write_internal() will be defined in misc/util.c, then both debugfs.c
and mke2fs.c can use it. We will do the similar thing to do_mkdir(),
do_symlink() and so on.
My questions are:
1) Is the "-d root-directory" option acceptable ?
2) Is the implementation idea OK ?
Please feel free to give your comments, and I will send the patches later
if this is fine.
--
Thanks
Robert
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC] e2fsprogs/mke2fs: add an option "-d root-directory"
2013-08-05 8:40 [RFC] e2fsprogs/mke2fs: add an option "-d root-directory" Robert Yang
@ 2013-08-05 15:17 ` Darren Hart
0 siblings, 0 replies; 2+ messages in thread
From: Darren Hart @ 2013-08-05 15:17 UTC (permalink / raw)
To: Robert Yang; +Cc: linux-ext4, Theodore Ts'o
On Mon, 2013-08-05 at 16:40 +0800, Robert Yang wrote:
> Hello folks,
>
> I'd like to add an "-d root-directory" option for mke2fs, which is used
> for adding files from the "root-directory" to the filesystem after the
> formatting, it is similar to genext2fs, but which only supports ext2 AFAIK.
> it's usage example would be:
>
> $ mke2fs -t extX -d <dir> <device>
>
> I've done a few work on it, we can re-use the code from debugfs/debugfs.c,
> here are the draft implementation thoughts:
>
> Move a part of the code from debugfs/debugfs.c to misc/util.c, for example,
> we will change the function do_write() in debugfs.c to:
>
> void do_write(int argc, char *argv[])
> {
> [snip];
> retval = do_write_internal();
> [snip];
> }
>
> The do_write_internal() will be defined in misc/util.c, then both debugfs.c
> and mke2fs.c can use it. We will do the similar thing to do_mkdir(),
> do_symlink() and so on.
>
> My questions are:
> 1) Is the "-d root-directory" option acceptable ?
> 2) Is the implementation idea OK ?
>
> Please feel free to give your comments, and I will send the patches later
> if this is fine.
The biggest concern expressed here when we first discussed this was an
increase in size. When you prepare patches, please include a size delta
report of the binary and ensure the dependencies don't increase any more
than absolutely necessary - preferably not at all.
Thanks,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-05 15:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05 8:40 [RFC] e2fsprogs/mke2fs: add an option "-d root-directory" Robert Yang
2013-08-05 15:17 ` Darren Hart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).