]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super0.c
Change update to enum in update_super and update_subarray
[thirdparty/mdadm.git] / super0.c
index d9f5bff49e0a596c149c3f6ffb564d37ed8c534c..a7c5f813d926fd13f99cebb2304acb8ba83f7ea0 100644 (file)
--- a/super0.c
+++ b/super0.c
@@ -491,7 +491,7 @@ static struct mdinfo *container_content0(struct supertype *st, char *subarray)
 }
 
 static int update_super0(struct supertype *st, struct mdinfo *info,
-                        char *update,
+                        enum update_opt update,
                         char *devname, int verbose,
                         int uuid_set, char *homehost)
 {
@@ -502,20 +502,19 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
        int rv = 0;
        int uuid[4];
        mdp_super_t *sb = st->sb;
-       enum update_opt update_enum = map_name(update_options, update);
 
-       if (update_enum == UOPT_HOMEHOST && homehost) {
+       if (update == UOPT_HOMEHOST && homehost) {
                /*
                 * note that 'homehost' is special as it is really
                 * a "uuid" update.
                 */
                uuid_set = 0;
-               update_enum = UOPT_UUID;
+               update = UOPT_UUID;
                info->uuid[0] = sb->set_uuid0;
                info->uuid[1] = sb->set_uuid1;
        }
 
-       switch (update_enum) {
+       switch (update) {
        case UOPT_UUID:
                if (!uuid_set && homehost) {
                        char buf[20];