* util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
(grub_util_biosdisk_get_grub_dev): Check open() exit status by
comparing it with -1, not 0.
+2008-02-11 Robert Millan <rmh@aybabtu.com>
+
+ * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
+ (grub_util_biosdisk_get_grub_dev): Check open() exit status by
+ comparing it with -1, not 0.
+
2008-02-10 Robert Millan <rmh@aybabtu.com>
* conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
int fd;
fd = open (map[drive], O_RDONLY);
- if (! fd)
+ if (fd == -1)
return grub_error (GRUB_ERR_BAD_DEVICE, "cannot open `%s'", map[drive]);
if (fstat (fd, &st) < 0 || ! S_ISBLK (st.st_mode))
sprintf (p, format, i);
fd = open (real_dev, O_RDONLY);
- if (! fd)
+ if (fd == -1)
return 0;
if (ioctl (fd, HDIO_GETGEO, &hdg))
return name;
fd = open (os_dev, O_RDONLY);
- if (! fd)
+ if (fd == -1)
{
grub_error (GRUB_ERR_BAD_DEVICE, "cannot open `%s'", os_dev);
free (name);