Whamcloud - gitweb
misc/create_inode.c: copy files recursively
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 6 Mar 2014 16:00:24 +0000 (11:00 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Mar 2014 16:00:24 +0000 (11:00 -0500)
commit052064b9195da7b6902409a455cdd22b6b2be3d7
tree474a50e758ab44f4b65a3cdd677031e8b0debcea
parent0d4deba22e2aa95ad958b44972dc933fd0ebbc59
misc/create_inode.c: copy files recursively

Use opendir() and readdir() to read the native directory, then use
lstat() to identify the file type and call the corresponding function to
add the file to the filesystem, call the populate_fs() recursively if it
is a directory.

NOTE: the libext2fs can't create the socket file.

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