mke2fs: add the ability to copy files from a given directory
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 6 Mar 2014 16:00:23 +0000 (11:00 -0500)
committerChanho Park <chanho61.park@samsung.com>
Tue, 5 Aug 2014 04:37:17 +0000 (13:37 +0900)
commit35bd320652a527e772b88877f0776613b5110b6f
tree78bdfe2ad66c8019b82dac9b34f680a4b33b7466
parentd8d47b95cdadca0e9c52bffec30e96aa26538659
mke2fs: add the ability to copy files from a given directory

We will add a -d option which will be used for adding the files from a
given directory to the filesystem, it is similiar to genext2fs, but
genext2fs doesn't fully support ext4.

* We already have the basic operations in debugfs:
  - Copy regular file
  - Create directory
  - Create symlink
  - Create special file

  We will move these operations into create_inode.h and create_inode.c,
  then let both mke2fs and debugfs use them.

* What we need to do are:
  - Copy the given directory recursively, this will be done by the
    populate_fs()
  - Set the owner, mode and other informations
  - Handle the hard links

TODO:
  - The libext2fs can't create the socket file (S_IFSOCK), do we have a
    plan to support it ?

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/create_inode.c [new file with mode: 0644]
misc/create_inode.h [new file with mode: 0644]