[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[2083] 2009-04-11 Felix Zielcke <address@hidden>
From: |
Felix Zielcke |
Subject: |
[2083] 2009-04-11 Felix Zielcke <address@hidden> |
Date: |
Sat, 11 Apr 2009 18:46:13 +0000 |
Revision: 2083
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2083
Author: fzielcke
Date: 2009-04-11 18:46:12 +0000 (Sat, 11 Apr 2009)
Log Message:
-----------
2009-04-11 Felix Zielcke <address@hidden>
* util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
(grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
GNU/kFreeBSD. Check if a device is a character device. Use
DIOCGMEDIASIZE to get the size.
(convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
support for GNU/kFreeBSD.
(grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
is a character device instead of a block device. Add support for
FreeBSD device names.
* util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
is a character device instead of a block device.
* util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
is a character device instead of a block device.
Modified Paths:
--------------
trunk/grub2/ChangeLog
trunk/grub2/util/getroot.c
trunk/grub2/util/grub-probe.c
trunk/grub2/util/hostdisk.c
Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog 2009-04-11 11:48:34 UTC (rev 2082)
+++ trunk/grub2/ChangeLog 2009-04-11 18:46:12 UTC (rev 2083)
@@ -1,3 +1,21 @@
+2009-04-11 Felix Zielcke <address@hidden>
+
+ * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
+ (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
+ GNU/kFreeBSD. Check if a device is a character device. Use
+ DIOCGMEDIASIZE to get the size.
+ (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
+ support for GNU/kFreeBSD.
+ (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
+ is a character device instead of a block device. Add support for
+ FreeBSD device names.
+
+ * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
+ is a character device instead of a block device.
+
+ * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
+ is a character device instead of a block device.
+
2009-04-11 Andrey Shuvikov <address@hidden>
* util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
Modified: trunk/grub2/util/getroot.c
===================================================================
--- trunk/grub2/util/getroot.c 2009-04-11 11:48:34 UTC (rev 2082)
+++ trunk/grub2/util/getroot.c 2009-04-11 18:46:12 UTC (rev 2083)
@@ -238,7 +238,7 @@
}
}
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
if (S_ISCHR (st.st_mode) && st.st_rdev == dev)
#else
if (S_ISBLK (st.st_mode) && st.st_rdev == dev)
Modified: trunk/grub2/util/grub-probe.c
===================================================================
--- trunk/grub2/util/grub-probe.c 2009-04-11 11:48:34 UTC (rev 2082)
+++ trunk/grub2/util/grub-probe.c 2009-04-11 18:46:12 UTC (rev 2083)
@@ -112,7 +112,7 @@
if (path == NULL)
{
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
if (! grub_util_check_char_device (device_name))
grub_util_error ("%s is not a character device.\n", device_name);
#else
Modified: trunk/grub2/util/hostdisk.c
===================================================================
--- trunk/grub2/util/hostdisk.c 2009-04-11 11:48:34 UTC (rev 2082)
+++ trunk/grub2/util/hostdisk.c 2009-04-11 18:46:12 UTC (rev 2083)
@@ -86,7 +86,7 @@
# define FLOPPY_MAJOR 2
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# include <sys/disk.h> /* DIOCGMEDIASIZE */
#endif
@@ -183,7 +183,7 @@
return GRUB_ERR_NONE;
}
-#elif defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD__)
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD__) ||
defined(__FreeBSD_kernel__)
{
unsigned long long nr;
int fd;
@@ -192,7 +192,7 @@
if (fd == -1)
return grub_error (GRUB_ERR_BAD_DEVICE, "cannot open `%s' while
attempting to get disk size", map[drive].device);
-# if defined(__FreeBSD__)
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
if (fstat (fd, &st) < 0 || ! S_ISCHR (st.st_mode))
# else
if (fstat (fd, &st) < 0 || ! S_ISBLK (st.st_mode))
@@ -202,7 +202,7 @@
goto fail;
}
-# if defined(__FreeBSD__)
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
if (ioctl (fd, DIOCGMEDIASIZE, &nr))
# else
if (ioctl (fd, BLKGETSIZE64, &nr))
@@ -758,7 +758,7 @@
path[8] = 0;
return path;
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
char *path = xstrdup (os_dev);
if (strncmp ("/dev/", path, 5) == 0)
{
@@ -821,7 +821,7 @@
return 0;
}
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
if (! S_ISCHR (st.st_mode))
#else
if (! S_ISBLK (st.st_mode))
@@ -970,7 +970,7 @@
return make_device_name (drive, dos_part, bsd_part);
}
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
/* FreeBSD uses "/dev/[a-z]+[0-9]+(s[0-9]+[a-z]?)?". */
{
int dos_part = -1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [2083] 2009-04-11 Felix Zielcke <address@hidden>,
Felix Zielcke <=