If you ran part-get-parttype command on a device which didn't
contain a partition, it used to return the string "loop". This
is an internal representation that parted uses. We should instead
return an error because part-get-parttype makes no sense for
devices which are not partitioned.
}
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 */
}
}