btrfs-progs: kill check for /'s in labels
authorJosef Bacik <jbacik@redhat.com>
Thu, 22 Jan 2009 19:25:44 +0000 (14:25 -0500)
committerDavid Sterba <dsterba@suse.cz>
Fri, 25 Jan 2013 22:38:31 +0000 (23:38 +0100)
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,

Signed-off-by: Josef Bacik <jbacik@redhat.com>
mkfs.c

diff --git a/mkfs.c b/mkfs.c
index 36c3914..a129ec4 100644 (file)
--- a/mkfs.c
+++ b/mkfs.c
@@ -357,7 +357,6 @@ static u64 parse_profile(char *s)
 
 static char *parse_label(char *input)
 {
-       int i;
        int len = strlen(input);
 
        if (len >= BTRFS_LABEL_SIZE) {
@@ -365,12 +364,6 @@ static char *parse_label(char *input)
                        BTRFS_LABEL_SIZE - 1);
                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);
 }