From 3d048e0f77b46dd9007fcba874f94b60597121d4 Mon Sep 17 00:00:00 2001 From: "Brint E. Kriebel" Date: Wed, 14 Feb 2018 23:02:06 -0800 Subject: [PATCH] releasetools: Use the first entry of a mount point when reading fstab There may be multiple entries in fstab for a mount point. Use the first value found so the entries are prioritized in order. Change-Id: Ibd2631413d3e00507d3a0ec84fb91755f1c7993c Ticket: OPO-326 --- tools/releasetools/common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 0ff47a3ce8..f220dfe7ce 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -1241,9 +1241,10 @@ def LoadRecoveryFSTab(read_helper, fstab_version, recovery_fstab_path): context = i mount_point = pieces[1] - d[mount_point] = Partition(mount_point=mount_point, fs_type=pieces[2], - device=pieces[0], length=length, context=context, - slotselect=slotselect) + if not d.get(mount_point): + d[mount_point] = Partition(mount_point=mount_point, fs_type=pieces[2], + device=pieces[0], length=length, context=context, + slotselect=slotselect) return d