Loading fs_mgr/fs_mgr_fstab.c +19 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include <sys/mount.h> #include <unistd.h> #include <cutils/properties.h> #include "fs_mgr_priv.h" struct fs_mgr_flag_values { Loading Loading @@ -330,6 +332,23 @@ struct fstab *fs_mgr_read_fstab(const char *fstab_path) fstab->recs[cnt].partnum = flag_vals.partnum; fstab->recs[cnt].swap_prio = flag_vals.swap_prio; fstab->recs[cnt].zram_size = flag_vals.zram_size; /* If an A/B partition, modify block device to be the real block device */ if (fstab->recs[cnt].fs_mgr_flags & MF_SLOTSELECT) { char propbuf[PROPERTY_VALUE_MAX]; char *tmp; /* use the kernel parameter if set */ property_get("ro.boot.slot_suffix", propbuf, ""); if (asprintf(&tmp, "%s%s", fstab->recs[cnt].blk_device, propbuf) > 0) { free(fstab->recs[cnt].blk_device); fstab->recs[cnt].blk_device = tmp; } else { ERROR("Error updating block device name\n"); goto err; } } cnt++; } /* If an A/B partition, modify block device to be the real block device */ Loading Loading
fs_mgr/fs_mgr_fstab.c +19 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include <sys/mount.h> #include <unistd.h> #include <cutils/properties.h> #include "fs_mgr_priv.h" struct fs_mgr_flag_values { Loading Loading @@ -330,6 +332,23 @@ struct fstab *fs_mgr_read_fstab(const char *fstab_path) fstab->recs[cnt].partnum = flag_vals.partnum; fstab->recs[cnt].swap_prio = flag_vals.swap_prio; fstab->recs[cnt].zram_size = flag_vals.zram_size; /* If an A/B partition, modify block device to be the real block device */ if (fstab->recs[cnt].fs_mgr_flags & MF_SLOTSELECT) { char propbuf[PROPERTY_VALUE_MAX]; char *tmp; /* use the kernel parameter if set */ property_get("ro.boot.slot_suffix", propbuf, ""); if (asprintf(&tmp, "%s%s", fstab->recs[cnt].blk_device, propbuf) > 0) { free(fstab->recs[cnt].blk_device); fstab->recs[cnt].blk_device = tmp; } else { ERROR("Error updating block device name\n"); goto err; } } cnt++; } /* If an A/B partition, modify block device to be the real block device */ Loading