Start using new C++ Fstab class widely
Bug: 62292478
Test: boot
Test: adb-remount-test.sh
Change-Id: Id4715af4c1f03e2cfc67de92d3ea58e933685e51
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 2bebe76..7fd4e27 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -473,9 +473,10 @@
// Only needed if someone explicitly changes the default log level in their init.rc.
android::base::ScopedLogSeverity info(android::base::INFO);
- struct fstab* fstab = fs_mgr_read_fstab(fstabfile);
- int child_ret = fs_mgr_mount_all(fstab, mount_mode);
- fs_mgr_free_fstab(fstab);
+ Fstab fstab;
+ ReadFstabFromFile(fstabfile, &fstab);
+
+ int child_ret = fs_mgr_mount_all(&fstab, mount_mode);
if (child_ret == -1) {
PLOG(ERROR) << "fs_mgr_mount_all returned an error";
}