Fix fd comparison in Incremental
authorNeil Brown <neilb@suse.de>
Sat, 12 Jul 2008 10:28:38 +0000 (20:28 +1000)
committerNeil Brown <neilb@suse.de>
Sat, 12 Jul 2008 10:28:38 +0000 (20:28 +1000)
fd==0 is theoretically possible...

Incremental.c

index 712f2bd..266111a 100644 (file)
@@ -727,7 +727,7 @@ static char *container2devname(char *devname)
        int fd = open(devname, O_RDONLY);
        char *mdname = NULL;
 
-       if (fd > 0) {
+       if (fd >= 0) {
                mdname = devnum2devname(fd2devnum(fd));
                close(fd);
        }