Last active
December 14, 2015 21:49
-
-
Save awheeler/5153921 to your computer and use it in GitHub Desktop.
Add '.' support for glusterfs volume names, and provide additional error notification.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c | |
index c09aa62..7e55757 100644 | |
--- a/cli/src/cli-cmd-parser.c | |
+++ b/cli/src/cli-cmd-parser.c | |
@@ -211,7 +211,9 @@ cli_cmd_volume_create_parse (const char **words, int wordcount, dict_t **options | |
goto out; | |
for (i = 0; i < strlen (volname); i++) | |
- if (!isalnum (volname[i]) && (volname[i] != '_') && (volname[i] != '-')) | |
+ if (!isalnum (volname[i]) && (volname[i] != '_') && (volname[i] != '-') && (volname[i] != '.')) { | |
+ cli_err ("\"%s\" contains one or more invalid characters.", | |
+ volname); | |
goto out; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment