fs_mgr: use different fstab paths for normal/recovery boot

  recovery boot: /etc/recovery.fstab
  normal boot: use the first one found by the order:
               /odm/etc/fstab.{hardware} ->
               /vendor/etc/fstab.{hardware} ->
               /fstab.{hardware}

Bug: 35811655
Bug: 36637553

Test: Sideload OTA installation in sailfish
Change-Id: I3e260e077afa5a37fb65246246c824e9379e68c8
(cherry picked from commit d05a2f7dcb8f2f1b202a5e8262e24d285e9674a2)
diff --git a/fs_mgr/fs_mgr_fstab.cpp b/fs_mgr/fs_mgr_fstab.cpp
index 67cc5be..70b10e0 100644
--- a/fs_mgr/fs_mgr_fstab.cpp
+++ b/fs_mgr/fs_mgr_fstab.cpp
@@ -692,7 +692,10 @@
     std::string hw;
     std::string default_fstab;
 
-    if (fs_mgr_get_boot_config("hardware", &hw)) {
+    // Use different fstab paths for normal boot and recovery boot, respectively
+    if (access("/sbin/recovery", F_OK) == 0) {
+        default_fstab = "/etc/recovery.fstab";
+    } else if (fs_mgr_get_boot_config("hardware", &hw)) {  // normal boot
         for (const char *prefix : {"/odm/etc/fstab.","/vendor/etc/fstab.", "/fstab."}) {
             default_fstab = prefix + hw;
             if (access(default_fstab.c_str(), F_OK) == 0) break;