fix logic bug inside extroot uuid verification code
[project/fstools.git] / block.c
diff --git a/block.c b/block.c
index 720ecb1..2e95c03 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1108,7 +1108,7 @@ static int check_extroot(char *path)
                                         tag, errno, strerror(errno));
                        fclose(fp);
 
-                       if (*uuid || !strcasecmp(uuid, pr->uuid))
+                       if (*uuid && !strcasecmp(uuid, pr->uuid))
                                return 0;
 
                        ULOG_ERR("extroot: UUID mismatch (root: %s, %s: %s)\n",