From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugeniu Rosca Date: Tue, 19 Mar 2019 23:57:06 +0100 Subject: [U-Boot] [PATCH 2/2] fastboot: getvar_partition_type: Return 'raw' when FS-unaware In-Reply-To: <20190319225706.27649-1-erosca@de.adit-jv.com> References: <20190319225706.27649-1-erosca@de.adit-jv.com> Message-ID: <20190319225706.27649-2-erosca@de.adit-jv.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Only a handful of Android/fastboot partitions (e.g. /system, /vendor, /userdata) have filesystem: host $> fastboot getvar partition-type:userdata partition-type:userdata: ext4 Finished. Total time: 0.013s Most of them (/misc, /pstore, /vbmeta, /dtb{o}, /boot, etc) don't. And for the latter fastboot reports: host $> fastboot getvar partition-type:misc getvar:partition-type:misc FAILED (remote: failed to set partition) Finished. Total time: 0.219s Rather than creating pointless worries via error reporting, tell the users they are dealing with a 'raw' partition: host $> fastboot getvar partition-type:misc partition-type:misc: raw Finished. Total time: 0.017s Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot") Signed-off-by: Eugeniu Rosca --- drivers/fastboot/fb_getvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c index 28e3e2fa1619..beadf7f98e5d 100644 --- a/drivers/fastboot/fb_getvar.c +++ b/drivers/fastboot/fb_getvar.c @@ -154,7 +154,7 @@ static void getvar_partition_type(char *part_name, char *response) if (r >= 0) { r = fs_set_blk_dev_with_part(dev_desc, r); if (r < 0) - fastboot_fail("failed to set partition", response); + fastboot_okay("raw", response); else fastboot_okay(fs_get_type_name(), response); } -- 2.21.0