From d5c3a09f7d3476610c2a3d0797fe8d1a619ab4ea Mon Sep 17 00:00:00 2001 From: fang hui Date: Thu, 27 Apr 2017 12:47:16 +0800 Subject: MA-9526 - [iot]: userdata, system partition's fs type should be ext4 Hard code userdata, system partition's fs type to ext4. Change-Id: I683d5dceba853325a63f30283e25cbff3eee3eae Signed-off-by: fang hui --- drivers/usb/gadget/f_fastboot.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index bc59211..675f85a 100755 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -9,6 +9,7 @@ * Rob Herring * * Copyright (C) 2016 Freescale Semiconductor, Inc. + * Copyright 2017 NXP * * SPDX-License-Identifier: GPL-2.0+ */ @@ -1325,13 +1326,18 @@ static int _fastboot_parts_add_ptable_entry(int ptable_index, strcpy(ptable[ptable_index].fstype, (const char *)info.type); #else strcpy(ptable[ptable_index].name, name); - if (!strcmp(name, "userdata") || !strcmp(name, "system_a") || - !strcmp(name, "system_b")) { - strcpy(ptable[ptable_index].fstype, "ext4"); - } else { - strcpy(ptable[ptable_index].fstype, "emmc"); - } -#endif + strcpy(ptable[ptable_index].fstype, "emmc"); +#endif + /* For EFI partition, the fs type is from get_partition_info_efi. + * But The function does not parse type_guid, just hard code to + * "U-Boot", so we hard code here */ + if (!strcmp(ptable[ptable_index].name, "userdata") || + !strcmp(ptable[ptable_index].name, "system_a") || + !strcmp(ptable[ptable_index].name, "system_b") || + !strcmp(ptable[ptable_index].name, "system")) { + strcpy(ptable[ptable_index].fstype, "ext4"); + } + #ifdef CONFIG_PARTITION_UUIDS strcpy(ptable[ptable_index].uuid, (const char *)info.uuid); #endif -- cgit v1.1