* GRUB MTD DISKONCHIP patch failure with "grub-2003-01-08-doc.patch" on file stage2/disk_io.c using latest GRUB CVS
@ 2003-11-11 3:11 Mike Gore
2003-11-11 6:33 ` Ilguiz Latypov
0 siblings, 1 reply; 3+ messages in thread
From: Mike Gore @ 2003-11-11 3:11 UTC (permalink / raw)
To: linux-mtd
I downloaded the latest CVS for grub on 10 Nov 2003 at 9:30pmEST and
attempted to apply the MTD patch grub-2003-01-08-doc.patch
Besides the expected Changelog and Authors errors I got one rejected
section on stage2/disk_io.c (see below for copy of the failed section)
It is not totally clear to me how to fix this - looking at the code it
seems that the patch is using a different parsing method and as such it
is not clear how to proceed since
I do not have the grub code from the original patch date - nor do I know
what bugs it may have had and or have fixed...
I suspect the problem must be recent since others have reported success
with patching GRUB in the last few months
I would be thankfull for any pointers
Here is disk_io.c.rej
***************
*** 964,987 ****
return device + 2;
}
- if ((*device == 'f' || *device == 'h' || *device == 'n')
- && (device += 2, (*(device - 1) != 'd')))
- errnum = ERR_NUMBER_PARSING;
- if (ch == 'n')
- current_drive = NETWORK_DRIVE;
- else
{
safe_parse_maxint (&device, (int *) ¤t_drive);
disk_choice = 0;
if (ch == 'h')
current_drive += 0x80;
}
}
if (errnum)
- return 0;
if (*device == ')')
{
--- 1024,1060 ----
return device + 2;
}
+ device += 2;
+ #define MK16(a,b) ( ((a)<<8) + (b) )
+
+ switch (MK16(ch, *(device-1)))
{
+ case MK16('n','d'):
+ current_drive = NETWORK_DRIVE;
+ break;
+
+ case MK16('d','c'):
safe_parse_maxint (&device, (int *) ¤t_drive);
+ disk_choice = 0;
+ current_drive += DISK_ON_CHIP;
+ break;
+ case MK16('h','d'):
+ case MK16('f','d'):
+ safe_parse_maxint (&device, (int *) ¤t_drive);
disk_choice = 0;
if (ch == 'h')
current_drive += 0x80;
+ break;
+
+ default:
+ errnum = ERR_NUMBER_PARSING;
}
}
if (errnum)
+ return 0;
if (*device == ')')
{
--
# Mike Gore
# At Home: InfoWrite Consulting
# Mail: 405 Midwood Cres, Waterloo Ontario, N2L 5N4
# Phone: 1-519-884-4943
# Fax: 1-519-885-0548
# Email: magore@sympatico.ca
#
# At Work: Technical Support, CSCF
# Smail: DC3549C, University of Waterloo, 200 University Ave
# Waterloo Ontario, Canada, N2L 3G1
# Phone: 1-519-888-4567, x6205
# Fax: 1-519-746-5036
# Email: magore@uwaterloo.ca
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GRUB MTD DISKONCHIP patch failure with "grub-2003-01-08-doc.patch" on file stage2/disk_io.c using latest GRUB CVS
2003-11-11 3:11 GRUB MTD DISKONCHIP patch failure with "grub-2003-01-08-doc.patch" on file stage2/disk_io.c using latest GRUB CVS Mike Gore
@ 2003-11-11 6:33 ` Ilguiz Latypov
2003-11-11 8:37 ` GRUB MTD DISKONCHIP patch failure withGRUB CVS David Woodhouse
0 siblings, 1 reply; 3+ messages in thread
From: Ilguiz Latypov @ 2003-11-11 6:33 UTC (permalink / raw)
To: linux-mtd
Mike,
On Mon, Nov 10, 2003 at 10:11:32PM -0500, Mike Gore wrote:
> I downloaded the latest CVS for grub on 10 Nov 2003 at 9:30pmEST and
> attempted to apply the MTD patch grub-2003-01-08-doc.patch
> Besides the expected Changelog and Authors errors I got one rejected
> section on stage2/disk_io.c (see below for copy of the failed section)
I updated the patch to match the change in disk_io.c you've found. The
new patch is grub-2003-11-10-doc.patch. I tested it only with a floppy
boot.
--
Ilguiz Latypov
tel. +1 (519) 569-8746
66 Wildlark Crescent
Kitchener, Ontario N2N 3E9
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GRUB MTD DISKONCHIP patch failure withGRUB CVS
2003-11-11 6:33 ` Ilguiz Latypov
@ 2003-11-11 8:37 ` David Woodhouse
0 siblings, 0 replies; 3+ messages in thread
From: David Woodhouse @ 2003-11-11 8:37 UTC (permalink / raw)
To: Ilguiz Latypov; +Cc: linux-mtd
On Tue, 2003-11-11 at 01:33 -0500, Ilguiz Latypov wrote:
> Mike,
>
> On Mon, Nov 10, 2003 at 10:11:32PM -0500, Mike Gore wrote:
> > I downloaded the latest CVS for grub on 10 Nov 2003 at 9:30pmEST and
> > attempted to apply the MTD patch grub-2003-01-08-doc.patch
> > Besides the expected Changelog and Authors errors I got one rejected
> > section on stage2/disk_io.c (see below for copy of the failed section)
>
> I updated the patch to match the change in disk_io.c you've found. The
> new patch is grub-2003-11-10-doc.patch. I tested it only with a floppy
> boot.
Thanks for doing that. We _really_ ought to sort out the copyright
assignments so the patch can be merged.
--
dwmw2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-11-11 8:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-11 3:11 GRUB MTD DISKONCHIP patch failure with "grub-2003-01-08-doc.patch" on file stage2/disk_io.c using latest GRUB CVS Mike Gore
2003-11-11 6:33 ` Ilguiz Latypov
2003-11-11 8:37 ` GRUB MTD DISKONCHIP patch failure withGRUB CVS David Woodhouse
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.