View | Details | Raw Unified | Return to bug 62141
Collapse All | Expand All

(-)/usr/ports/sysutils/grub/Makefile (-1 / +2 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	grub
8
PORTNAME=	grub
9
PORTVERSION=	0.94
9
PORTVERSION=	0.94
10
PORTREVISION=	1
10
CATEGORIES=	sysutils
11
CATEGORIES=	sysutils
11
MASTER_SITES=	ftp://alpha.gnu.org/gnu/grub/
12
MASTER_SITES=	ftp://alpha.gnu.org/gnu/grub/
12
13
Lines 19-25 Link Here
19
ONLY_FOR_ARCHS=	i386
20
ONLY_FOR_ARCHS=	i386
20
21
21
MAN1=		mbchk.1
22
MAN1=		mbchk.1
22
MAN8=		grub.8 grub-install.8 grub-md5-crypt.8
23
MAN8=		grub.8 grub-install.8 grub-md5-crypt.8 grub-terminfo.8
23
INFO=		grub multiboot
24
INFO=		grub multiboot
24
25
25
#.if defined(WITH_SPLASHIMAGE)
26
#.if defined(WITH_SPLASHIMAGE)
(-)/usr/ports/sysutils/grub/files/patch-lib_device.c (-7 / +41 lines)
Lines 1-5 Link Here
1
--- lib/device.c.orig	Sat Jan 24 01:52:56 2004
1
--- lib/device.c.orig	Sat Jan 17 18:57:57 2004
2
+++ lib/device.c	Sun Jan 25 00:07:02 2004
2
+++ lib/device.c	Sat Jan 31 06:32:24 2004
3
@@ -78,6 +78,12 @@
3
@@ -78,6 +78,12 @@
4
 # include <sys/ioctl.h>		/* ioctl */
4
 # include <sys/ioctl.h>		/* ioctl */
5
 # include <sys/disklabel.h>
5
 # include <sys/disklabel.h>
Lines 13-19 Link Here
13
 #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ */
13
 #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ */
14
 
14
 
15
 #ifdef HAVE_OPENDISK
15
 #ifdef HAVE_OPENDISK
16
@@ -123,6 +129,7 @@
16
@@ -94,8 +100,16 @@
17
 {
18
   int fd;
19
 
20
-  fd = open (map[drive], O_RDONLY);
21
-  assert (fd >= 0);
22
+#if defined(__FreeBSD__)
23
+  if(geom->flags == -1)
24
+  {
25
+#endif
26
+      fd = open (map[drive], O_RDONLY);
27
+      assert (fd >= 0);
28
+#if defined(__FreeBSD__)
29
+  } else
30
+      fd = geom->flags;
31
+#endif
32
 
33
 #if defined(__linux__)
34
   /* Linux */
35
@@ -123,6 +137,7 @@
17
   /* FreeBSD, NetBSD or OpenBSD */
36
   /* FreeBSD, NetBSD or OpenBSD */
18
   {
37
   {
19
     struct disklabel hdg;
38
     struct disklabel hdg;
Lines 21-30 Link Here
21
     if (ioctl (fd, DIOCGDINFO, &hdg))
40
     if (ioctl (fd, DIOCGDINFO, &hdg))
22
       goto fail;
41
       goto fail;
23
     
42
     
24
@@ -131,6 +138,38 @@
43
@@ -131,7 +146,40 @@
25
     geom->sectors = hdg.d_nsectors;
44
     geom->sectors = hdg.d_nsectors;
26
     geom->total_sectors = hdg.d_secperunit;
45
     geom->total_sectors = hdg.d_secperunit;
27
 
46
 
47
-    close (fd);
28
+#else
48
+#else
29
+    u_int    u, secsize;
49
+    u_int    u, secsize;
30
+    off_t    mediasize;
50
+    off_t    mediasize;
Lines 57-66 Link Here
57
+    geom->sectors = hdg.d_nsectors;
77
+    geom->sectors = hdg.d_nsectors;
58
+    geom->total_sectors = hdg.d_secperunit;
78
+    geom->total_sectors = hdg.d_secperunit;
59
+#endif
79
+#endif
60
     close (fd);
80
+    if(geom->flags == -1)
81
+	close (fd);
61
     return;
82
     return;
62
   }
83
   }
63
@@ -233,7 +272,7 @@
84
   
85
@@ -203,7 +251,11 @@
86
   sprintf (name, "/dev/fd%d", unit);
87
 #elif defined(__FreeBSD__)
88
   /* FreeBSD */
89
+#if __FreeBSD__ >= 4
90
+  sprintf (name, "/dev/fd%d", unit);
91
+#else
92
   sprintf (name, "/dev/rfd%d", unit);
93
+#endif
94
 #elif defined(__NetBSD__)
95
   /* NetBSD */
96
   /* opendisk() doesn't work for floppies.  */
97
@@ -233,7 +285,7 @@
64
 #elif defined(__FreeBSD__)
98
 #elif defined(__FreeBSD__)
65
   /* FreeBSD */
99
   /* FreeBSD */
66
 # if __FreeBSD__ >= 4
100
 # if __FreeBSD__ >= 4
Lines 69-75 Link Here
69
 # else /* __FreeBSD__ <= 3 */
103
 # else /* __FreeBSD__ <= 3 */
70
   sprintf (name, "/dev/rwd%d", unit);
104
   sprintf (name, "/dev/rwd%d", unit);
71
 # endif /* __FreeBSD__ <= 3 */
105
 # endif /* __FreeBSD__ <= 3 */
72
@@ -274,7 +313,11 @@
106
@@ -274,7 +326,11 @@
73
   sprintf (name, "/dev/sd%d", unit);
107
   sprintf (name, "/dev/sd%d", unit);
74
 #elif defined(__FreeBSD__)
108
 #elif defined(__FreeBSD__)
75
   /* FreeBSD */
109
   /* FreeBSD */
(-)/usr/ports/sysutils/grub/files/patch-netboot_main.c (+18 lines)
Line 0 Link Here
1
--- netboot/main.c.orig	Sat Jan 18 21:13:02 2003
2
+++ netboot/main.c	Sat Jan 18 21:13:27 2003
3
@@ -82,6 +82,7 @@
4
   RFC2132_MSG_TYPE, 1, DHCPDISCOVER,	
5
   RFC2132_MAX_SIZE,2,	/* request as much as we can */
6
   ETH_MAX_MTU / 256, ETH_MAX_MTU % 256,
7
+  RFC2132_VENDOR_CLASS_ID,4,'G','R','U','B',
8
   RFC2132_PARAM_LIST, 4, RFC1533_NETMASK, RFC1533_GATEWAY,
9
   RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH
10
 };
11
@@ -93,6 +94,7 @@
12
   RFC2132_REQ_ADDR, 4, 0, 0, 0, 0,
13
   RFC2132_MAX_SIZE, 2,	/* request as much as we can */
14
   ETH_MAX_MTU / 256, ETH_MAX_MTU % 256,
15
+  RFC2132_VENDOR_CLASS_ID,4,'G','R','U','B',
16
   /* request parameters */
17
   RFC2132_PARAM_LIST,
18
   /* 4 standard + 2 vendortags */

Return to bug 62141