summaryrefslogtreecommitdiffstats
path: root/fs_mgr/fs_mgr_main.c
diff options
context:
space:
mode:
authorKen Sumrall <ksumrall@android.com>2013-02-13 12:58:40 -0800
committerKen Sumrall <ksumrall@android.com>2013-02-19 10:18:42 -0800
commitab6b852235d99d752678312c155a3f1c140fb483 (patch)
tree0ec27d646225731c2b8c7b850b7390e48822d9ea /fs_mgr/fs_mgr_main.c
parent9e76a29752ff9d047e98c34c1cb93e7e2a27ebcd (diff)
downloadsystem_core-ab6b852235d99d752678312c155a3f1c140fb483.tar.gz
system_core-ab6b852235d99d752678312c155a3f1c140fb483.tar.bz2
system_core-ab6b852235d99d752678312c155a3f1c140fb483.zip
fs_mgr: support a unified fstab format.
Update fs_mgr to support more flags needed to unify the 3 fstabs currently in android into one. Change-Id: Ie46cea61a5b19882c55098bdd70f39e78fb603be
Diffstat (limited to 'fs_mgr/fs_mgr_main.c')
-rw-r--r--fs_mgr/fs_mgr_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs_mgr/fs_mgr_main.c b/fs_mgr/fs_mgr_main.c
index 81febf124..4bde4a1da 100644
--- a/fs_mgr/fs_mgr_main.c
+++ b/fs_mgr/fs_mgr_main.c
@@ -82,7 +82,8 @@ int main(int argc, char *argv[])
int n_flag=0;
char *n_name;
char *n_blk_dev;
- char *fstab;
+ char *fstab_file;
+ struct fstab *fstab;
klog_init();
klog_set_level(6);
@@ -90,7 +91,9 @@ int main(int argc, char *argv[])
parse_options(argc, argv, &a_flag, &u_flag, &n_flag, &n_name, &n_blk_dev);
/* The name of the fstab file is last, after the option */
- fstab = argv[argc - 1];
+ fstab_file = argv[argc - 1];
+
+ fstab = fs_mgr_read_fstab(fstab_file);
if (a_flag) {
return fs_mgr_mount_all(fstab);
@@ -103,6 +106,8 @@ int main(int argc, char *argv[])
exit(1);
}
+ fs_mgr_free_fstab(fstab);
+
/* Should not get here */
exit(1);
}