if (r == -1) {
/* Test failed, eg. missing or completely unusable parted binary. */
reply_with_error ("could not run 'parted' command");
+ free (err);
return -1;
}
if (err && strstr (err, "invalid option -- m"))
- return result = 0;
-
- return result = 1;
+ result = 0;
+ else
+ result = 1;
+ free (err);
+ return result;
}
static char *
}
free_strings (lines);
+
+ /* If "loop" return an error (RHBZ#634246). */
+ if (STREQ (r, "loop")) {
+ free (r);
+ reply_with_error ("not a partitioned device");
+ return NULL;
+ }
+
return r;
}
else {
return NULL;
}
+ /* If "loop" return an error (RHBZ#634246). */
+ if (STREQ (p, "loop")) {
+ free (p);
+ reply_with_error ("not a partitioned device");
+ return NULL;
+ }
+
return p; /* caller frees */
}
}