From 3c653f57221941a7c0af55f889882740835a8b42 Mon Sep 17 00:00:00 2001 From: Haakan T Johansson Date: Wed, 28 Sep 2016 02:20:53 +0200 Subject: [PATCH] Change separator in rotorvector configuration from : to ; (Squash with earlier commit!) Example becomes: ssd<=4;mixed<=64;123,hdd --- module/zfs/metaslab.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c index 21f18b42cd1f..df03271d6698 100644 --- a/module/zfs/metaslab.c +++ b/module/zfs/metaslab.c @@ -614,24 +614,24 @@ metaslab_parse_rotor_config(metaslab_class_t *mc, char *rotorvector) while (rotorvector < endconfig) { char *nextrotor; - char *colon, *lessthan; + char *semicolon, *lessthan; char *endtypes; int nguids = 0; nextrotor = endconfig; - colon = strchr(rotorvector, ':'); - if (colon == NULL) - colon = endconfig; + semicolon = strchr(rotorvector, ';'); + if (semicolon == NULL) + semicolon = endconfig; else - nextrotor = colon+1; + nextrotor = semicolon+1; lessthan = strstr(rotorvector, "<="); - if ((lessthan == NULL && colon != endconfig) || - lessthan > colon) + if ((lessthan == NULL && semicolon != endconfig) || + lessthan > semicolon) return; /* malformed, missing '<=' in this item */ - if (lessthan != NULL && colon == endconfig) + if (lessthan != NULL && semicolon == endconfig) return; /* malformed, '<=' for last item */ - endtypes = (lessthan) ? lessthan : colon; + endtypes = (lessthan) ? lessthan : semicolon; while (rotorvector < endtypes) { char *comma, *nexttype; @@ -691,7 +691,7 @@ metaslab_parse_rotor_config(metaslab_class_t *mc, char *rotorvector) uint64_t threshold; #ifdef _KERNEL char tmpstr[64]; - size_t len = colon-(lessthan+2); + size_t len = semicolon-(lessthan+2); strncpy(tmpstr, lessthan+2, len); tmpstr[len] = 0; #endif @@ -701,7 +701,7 @@ metaslab_parse_rotor_config(metaslab_class_t *mc, char *rotorvector) #else char *endptr; threshold = strtoull(lessthan+2, &endptr, 0); - if (endptr != colon) + if (endptr != semicolon) return; /* malformed configuration */ #endif /*