Eric Sandeen d9f137
commit 4add89acc9cb0786aa123af4f33b6e45c724dca0
Eric Sandeen d9f137
Author: Qu Wenruo <quwenruo@cn.fujitsu.com>
Eric Sandeen d9f137
Date:   Wed Jul 29 10:28:17 2015 +0800
Eric Sandeen d9f137
Eric Sandeen d9f137
    btrfs-progs: Add missing exit for parse_profile function
Eric Sandeen d9f137
    
Eric Sandeen d9f137
    In parse_profile() function, in error handling route, it output error
Eric Sandeen d9f137
    message but forgot to exit(1), causing even profile is not valid, it
Eric Sandeen d9f137
    will just fallback to single.
Eric Sandeen d9f137
    
Eric Sandeen d9f137
    Reported-by: James Harvey <jamespharvey20@gmail.com>
Eric Sandeen d9f137
    Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Eric Sandeen d9f137
    Signed-off-by: David Sterba <dsterba@suse.com>
Eric Sandeen d9f137
Eric Sandeen d9f137
diff --git a/mkfs.c b/mkfs.c
Eric Sandeen d9f137
index 9073f87..7d635dc 100644
Eric Sandeen d9f137
--- a/mkfs.c
Eric Sandeen d9f137
+++ b/mkfs.c
Eric Sandeen d9f137
@@ -356,6 +356,7 @@ static u64 parse_profile(char *s)
Eric Sandeen d9f137
 		return 0;
Eric Sandeen d9f137
 	} else {
Eric Sandeen d9f137
 		fprintf(stderr, "Unknown profile %s\n", s);
Eric Sandeen d9f137
+		exit(1);
Eric Sandeen d9f137
 	}
Eric Sandeen d9f137
 	/* not reached */
Eric Sandeen d9f137
 	return 0;