diff mbox

btrfs-progs: Add missing exit for parse_profile function

Message ID 1438136897-11590-1-git-send-email-quwenruo@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Qu Wenruo July 29, 2015, 2:28 a.m. UTC
In parse_profile() function, in error handling route, it output error
message but forgot to exit(1), causing even profile is not valid, it
will just fallback to single.

Reported-by: James Harvey <jamespharvey20@gmail.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 mkfs.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Sterba July 30, 2015, 9:20 a.m. UTC | #1
On Wed, Jul 29, 2015 at 10:28:17AM +0800, Qu Wenruo wrote:
> In parse_profile() function, in error handling route, it output error
> message but forgot to exit(1), causing even profile is not valid, it
> will just fallback to single.
> 
> Reported-by: James Harvey <jamespharvey20@gmail.com>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/mkfs.c b/mkfs.c
index 9073f87..7d635dc 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -356,6 +356,7 @@  static u64 parse_profile(char *s)
 		return 0;
 	} else {
 		fprintf(stderr, "Unknown profile %s\n", s);
+		exit(1);
 	}
 	/* not reached */
 	return 0;