]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: fix cdrom detection
authorKarel Zak <kzak@redhat.com>
Wed, 1 Feb 2012 12:42:08 +0000 (13:42 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 1 Feb 2012 12:42:08 +0000 (13:42 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk/fdisk.c

index 120f318092248ae34f0046b73d5e461ffbccaf89..66c5d18e80856b41493c515463325c1d5064785c 100644 (file)
@@ -2753,7 +2753,7 @@ static int is_ide_cdrom_or_tape(char *device)
 {
        int fd, ret;
 
-       if ((fd = open(device, O_RDONLY) < 0))
+       if ((fd = open(device, O_RDONLY)) < 0)
                return 0;
        ret = blkdev_is_cdrom(fd);