From 42a89831437ba96b42958cd8c5fdc670699d56c2 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Sat, 6 Jun 2015 01:03:48 +0200 Subject: [PATCH] btrfs-progs: mkfs: accept mixed case for profile names Signed-off-by: David Sterba --- mkfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mkfs.c b/mkfs.c index f73c5cbc..c0f60609 100644 --- a/mkfs.c +++ b/mkfs.c @@ -303,17 +303,17 @@ static u64 parse_profile(char *s) { if (strcmp(s, "raid0") == 0) { return BTRFS_BLOCK_GROUP_RAID0; - } else if (strcmp(s, "raid1") == 0) { + } else if (strcasecmp(s, "raid1") == 0) { return BTRFS_BLOCK_GROUP_RAID1; - } else if (strcmp(s, "raid5") == 0) { + } else if (strcasecmp(s, "raid5") == 0) { return BTRFS_BLOCK_GROUP_RAID5; - } else if (strcmp(s, "raid6") == 0) { + } else if (strcasecmp(s, "raid6") == 0) { return BTRFS_BLOCK_GROUP_RAID6; - } else if (strcmp(s, "raid10") == 0) { + } else if (strcasecmp(s, "raid10") == 0) { return BTRFS_BLOCK_GROUP_RAID10; - } else if (strcmp(s, "dup") == 0) { + } else if (strcasecmp(s, "dup") == 0) { return BTRFS_BLOCK_GROUP_DUP; - } else if (strcmp(s, "single") == 0) { + } else if (strcasecmp(s, "single") == 0) { return 0; } else { fprintf(stderr, "Unknown profile %s\n", s);