From: Mateusz Moscicki Date: Wed, 9 Feb 2022 21:08:07 +0000 (+0100) Subject: block: add support for partitions numbered greater than 9 X-Git-Tag: accepted/tizen/unified/20220428.162639~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9df472a2f80ac3244dfb99aecf42cfb65c04fb47;p=platform%2Fcore%2Fsystem%2Fstoraged.git block: add support for partitions numbered greater than 9 fnmatch() not match for partitions with numbers greater than 9 (e.g. /dev/mmcblk1p65) for the "mmcblk[0-9]p[0-9]" pattern. Change-Id: I21ee910ac8bcb00bdc8067f0ece331f2f913bb5a --- diff --git a/src/block/block.c b/src/block/block.c index 6c0568d..9456604 100644 --- a/src/block/block.c +++ b/src/block/block.c @@ -62,12 +62,12 @@ #include "storaged_common.h" #define MMC_PATH "*/mmcblk[0-9]*" -#define MMC_PARTITION_PATH "mmcblk[0-9]p[0-9]" +#define MMC_PARTITION_PATH "mmcblk[0-9]p[0-9]*" /* Emulator send devlink for sdcard as \*\/sdcard\/\* */ #define MMC_LINK_PATH "*/sdcard/*" -#define MMC_LINK_PARTITION_PATH "vd[a-z][0-9]" +#define MMC_LINK_PARTITION_PATH "vd[a-z][0-9]*" #define SCSI_PATH "*/sd[a-z]*" -#define SCSI_PARTITION_PATH "sd[a-z][0-9]" +#define SCSI_PARTITION_PATH "sd[a-z][0-9]*" #define SCSI_PARTITION_LENGTH 9 #define EXTENDEDSD_NODE_PATH "/dev/mapper/extendedsd" #define DEVICE_MAPPER_ROOT_NODE_PATH "/dev/mapper/rootfs"