diff options
Diffstat (limited to 'daemon/guestfsd.c')
-rw-r--r-- | daemon/guestfsd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 0db56e49..487662f2 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -558,6 +558,14 @@ compare_device_names (const char *a, const char *b) a += a_devlen; b += a_devlen; + /* If no partition numbers, bail -- the devices are the same. This + * can happen in one peculiar case: where you have a mix of devices + * with different interfaces (eg. /dev/sda and /dev/vda). + * (RHBZ#858128). + */ + if (!*a && !*b) + return 0; + r = sscanf (a, "%d", &a_partnum); assert (r == 1); r = sscanf (b, "%d", &b_partnum); |