Skip to contentSkip to conversation

btrfs-progs: kill check for /'s in labels

PATCH In review Josef Bacik 1 participant 2 messages Jan 22, 2009 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: kill check for /'s in labels

This patch kills a check in mkfs's label stuff which doesn't allow labels that have /'s in them. This causes problems for Anaconda which try to label volumes with their mountpoints. Thanks,

---
 mkfs.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
mkfs.c +0 -6
index d664254..5ed44cc 100644
@@ -302,12 +302,6 @@ static char *parse_label(char *input)
 			BTRFS_LABEL_SIZE);
 		exit(1);
 	}
-	for (i = 0; i < len; i++) {
-		if (input[i] == '/' || input[i] == '\\') {
-			fprintf(stderr, "invalid label %s\n", input);
-			exit(1);
-		}
-	}
 	return strdup(input);
 }
 
Signature · 1 line
1.5.4.3
#1 lore raw
Quoted 4 lines · Josef Bacik

This patch kills a check in mkfs's label stuff which doesn't allow labels that have /'s in them. This causes problems for Anaconda which try to label volumes with their mountpoints. Thanks,

Arrgh sorry, forgot to kill the int i part. Here's the updated patch, thanks,

Josef

mkfs.c +0 -7
index d664254..138bcc9 100644
@@ -294,7 +294,6 @@ static u64 parse_profile(char *s)
 
 static char *parse_label(char *input)
 {
-	int i;
 	int len = strlen(input);
 
 	if (len > BTRFS_LABEL_SIZE) {
@@ -302,12 +301,6 @@ static char *parse_label(char *input)
 			BTRFS_LABEL_SIZE);
 		exit(1);
 	}
-	for (i = 0; i < len; i++) {
-		if (input[i] == '/' || input[i] == '\\') {
-			fprintf(stderr, "invalid label %s\n", input);
-			exit(1);
-		}
-	}
 	return strdup(input);
 }