[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch for use on Linux's devfs
From: |
Thiago Macieira |
Subject: |
patch for use on Linux's devfs |
Date: |
Sun, 26 Nov 2000 19:32:02 -0200 |
I have found a small bug in GRUB 0.5.96.1 code, regarding use of
Linux's devfs naming scheme.
I've fixed the bug and tested -- it's now working fine. GRUB booted a
kernel version 2.4.0-test11 with ReiserFS without complaints.
Here's the patch:
====8<----
--- grub-0.5.96.1/lib/device.c~ Mon Oct 16 12:41:54 2000
+++ grub-0.5.96.1/lib/device.c Sun Nov 26 18:53:48 2000
@@ -614,7 +614,10 @@
if (have_devfs ())
{
if (strcmp (dev + strlen(dev) - 5, "/disc") == 0)
- strcat (dev + strlen(dev) - 5, "/part");
+ {
+ dev[strlen(dev) - 5] = '\0'; /* erase the ending /disc */
+ strcat (dev + strlen(dev) - 5, "/part");
+ }
}
sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
---->8====
--
Thiago Macieira - UFOT Registry number: 1001
address@hidden address@hidden
ICQ UIN: 1967141 PGP: 0x8F2978D5 and 0xEA9037A5
Registered Linux user #65028
345/373. Well, you haven't touched your snacks... -- Neelix -- Snacks
are irrelevant! Continue the story! -- Mezoti, "The Haunting of Deck
Twelve"
- patch for use on Linux's devfs,
Thiago Macieira <=