* [PATCH] don't assume floppy device exists
@ 2006-09-14 18:28 Robert Millan
2006-09-14 18:40 ` Marco Gerards
0 siblings, 1 reply; 3+ messages in thread
From: Robert Millan @ 2006-09-14 18:28 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
grub-install used to fail with "/dev/fd0 not found" errors. See attached patch.
2006-09-14 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-mkdevicemap.c: Make sure floppy device exists
before adding it to device.map.
--
Robert Millan
My spam trap is honeypot@aybabtu.com. Note: this address is only intended for
spam harvesters. Writing to it will get you added to my black list.
[-- Attachment #2: 04_mkdevicemap_dont_assume_floppies.diff --]
[-- Type: text/plain, Size: 851 bytes --]
2006-09-14 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-mkdevicemap.c: Make sure floppy device exists
before adding it to device.map.
Index: util/i386/pc/grub-mkdevicemap.c
===================================================================
RCS file: /sources/grub/grub2/util/i386/pc/grub-mkdevicemap.c,v
retrieving revision 1.2
diff -u -r1.2 grub-mkdevicemap.c
--- util/i386/pc/grub-mkdevicemap.c 24 Jul 2005 18:16:25 -0000 1.2
+++ util/i386/pc/grub-mkdevicemap.c 14 Sep 2006 17:54:36 -0000
@@ -378,8 +378,11 @@
for (i = 0; i < floppy_disks; i++)
{
char name[16];
+ struct stat st;
get_floppy_disk_name (name, i);
+ if (stat (name, &st) < 0)
+ break;
/* In floppies, write the map, whether check_device succeeds
or not, because the user just may not insert floppies. */
if (fp)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] don't assume floppy device exists
2006-09-14 18:28 [PATCH] don't assume floppy device exists Robert Millan
@ 2006-09-14 18:40 ` Marco Gerards
2006-09-14 18:56 ` Robert Millan
0 siblings, 1 reply; 3+ messages in thread
From: Marco Gerards @ 2006-09-14 18:40 UTC (permalink / raw)
To: The development of GRUB 2
Robert Millan <rmh@aybabtu.com> writes:
> grub-install used to fail with "/dev/fd0 not found" errors. See attached patch.
Thanks for the patch. Just keep sending them. ;-)
> 2006-09-14 Robert Millan <rmh@aybabtu.com>
>
> * util/i386/pc/grub-mkdevicemap.c: Make sure floppy device exists
> before adding it to device.map.
I think it would be better to say "the floppy drive", no?
> + if (stat (name, &st) < 0)
> + break;
The indentation looks a bit weird in my mailclient. Please make sure
the b of break is below the space after if.
After that, feel free to commit it.
--
Marco
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] don't assume floppy device exists
2006-09-14 18:40 ` Marco Gerards
@ 2006-09-14 18:56 ` Robert Millan
0 siblings, 0 replies; 3+ messages in thread
From: Robert Millan @ 2006-09-14 18:56 UTC (permalink / raw)
To: The development of GRUB 2
On Thu, Sep 14, 2006 at 08:40:53PM +0200, Marco Gerards wrote:
> Robert Millan <rmh@aybabtu.com> writes:
>
> > grub-install used to fail with "/dev/fd0 not found" errors. See attached patch.
>
> Thanks for the patch. Just keep sending them. ;-)
:)
> > 2006-09-14 Robert Millan <rmh@aybabtu.com>
> >
> > * util/i386/pc/grub-mkdevicemap.c: Make sure floppy device exists
> > before adding it to device.map.
>
> I think it would be better to say "the floppy drive", no?
As you like (using "the floppy device" after clarification via IRC).
> > + if (stat (name, &st) < 0)
> > + break;
>
> The indentation looks a bit weird in my mailclient. Please make sure
> the b of break is below the space after if.
It is. I copied the indentation from the printf below (tab + spaces).
> After that, feel free to commit it.
Done.
--
Robert Millan
My spam trap is honeypot@aybabtu.com. Note: this address is only intended for
spam harvesters. Writing to it will get you added to my black list.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-14 18:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-14 18:28 [PATCH] don't assume floppy device exists Robert Millan
2006-09-14 18:40 ` Marco Gerards
2006-09-14 18:56 ` Robert Millan
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.