* grub-probe without arguments
@ 2007-05-07 8:21 Robert Millan
2007-05-07 19:23 ` Yoshinori K. Okuji
0 siblings, 1 reply; 6+ messages in thread
From: Robert Millan @ 2007-05-07 8:21 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 261 bytes --]
I think it would be reasonable to allow grub-probe to work without arguments.
Any comments?
--
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: probe_without_arg.diff --]
[-- Type: text/x-diff, Size: 954 bytes --]
Index: util/i386/pc/grub-probe.c
===================================================================
RCS file: /sources/grub/grub2/util/i386/pc/grub-probe.c,v
retrieving revision 1.4
diff -u -r1.4 grub-probe.c
--- util/i386/pc/grub-probe.c 4 May 2007 23:00:56 -0000 1.4
+++ util/i386/pc/grub-probe.c 7 May 2007 08:18:47 -0000
@@ -229,17 +252,19 @@
/* Obtain PATH. */
if (optind >= argc)
{
- fprintf (stderr, "No path is specified.\n");
- usage (1);
+ path = DEFAULT_DIRECTORY;
+ }
+ else
+ {
+ path = argv[optind];
+ optind++;
}
- if (optind + 1 != argc)
+ if (optind != argc)
{
- fprintf (stderr, "Unknown extra argument `%s'.\n", argv[optind + 1]);
+ fprintf (stderr, "Unknown extra argument `%s'.\n", argv[optind]);
usage (1);
}
-
- path = argv[optind];
/* Initialize the emulated biosdisk driver. */
grub_util_biosdisk_init (dev_map ? : DEFAULT_DEVICE_MAP);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: grub-probe without arguments
2007-05-07 8:21 grub-probe without arguments Robert Millan
@ 2007-05-07 19:23 ` Yoshinori K. Okuji
2007-05-07 20:06 ` Robert Millan
0 siblings, 1 reply; 6+ messages in thread
From: Yoshinori K. Okuji @ 2007-05-07 19:23 UTC (permalink / raw)
To: The development of GRUB 2
On Monday 07 May 2007 10:21, Robert Millan wrote:
> I think it would be reasonable to allow grub-probe to work without
> arguments. Any comments?
Why do you think so? If you want to omit the argument, I think the Unix way is
to default to current dir.
Okuji
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: grub-probe without arguments
2007-05-07 19:23 ` Yoshinori K. Okuji
@ 2007-05-07 20:06 ` Robert Millan
2007-05-08 20:19 ` Yoshinori K. Okuji
0 siblings, 1 reply; 6+ messages in thread
From: Robert Millan @ 2007-05-07 20:06 UTC (permalink / raw)
To: The development of GRUB 2
On Mon, May 07, 2007 at 09:23:08PM +0200, Yoshinori K. Okuji wrote:
> On Monday 07 May 2007 10:21, Robert Millan wrote:
> > I think it would be reasonable to allow grub-probe to work without
> > arguments. Any comments?
>
> Why do you think so?
Because it's commonly invoked while debugging. The uninitiated might have
some trouble figuring out the right parameter (specialy if they're not
debugging themselves, but providing information for someone else to debug
e.g. via BTS).
> If you want to omit the argument, I think the Unix way is
> to default to current dir.
I think that would make it even worse, because user might be in a directory
that belongs to another filesystem and have no idea what is going on.
--
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] 6+ messages in thread
* Re: grub-probe without arguments
2007-05-07 20:06 ` Robert Millan
@ 2007-05-08 20:19 ` Yoshinori K. Okuji
2007-05-08 20:27 ` Otavio Salvador
2007-05-09 15:18 ` Robert Millan
0 siblings, 2 replies; 6+ messages in thread
From: Yoshinori K. Okuji @ 2007-05-08 20:19 UTC (permalink / raw)
To: The development of GRUB 2
On Monday 07 May 2007 22:06, Robert Millan wrote:
> On Mon, May 07, 2007 at 09:23:08PM +0200, Yoshinori K. Okuji wrote:
> > On Monday 07 May 2007 10:21, Robert Millan wrote:
> > > I think it would be reasonable to allow grub-probe to work without
> > > arguments. Any comments?
> >
> > Why do you think so?
>
> Because it's commonly invoked while debugging. The uninitiated might have
> some trouble figuring out the right parameter (specialy if they're not
> debugging themselves, but providing information for someone else to debug
> e.g. via BTS).
The right parameter depends on system status. For instance, if you are trying
to install GRUB from an installer, and a boot partition is mounted at
somewhere else (e.g. /mnt/boot), it won't work correctly, anyway. I prefer
that grub-probe gets an argument explicitly, so that the user can at least
understand that grub-probe probes a certain directory.
Okuji
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: grub-probe without arguments
2007-05-08 20:19 ` Yoshinori K. Okuji
@ 2007-05-08 20:27 ` Otavio Salvador
2007-05-09 15:18 ` Robert Millan
1 sibling, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2007-05-08 20:27 UTC (permalink / raw)
To: The development of GRUB 2
"Yoshinori K. Okuji" <okuji@enbug.org> writes:
> On Monday 07 May 2007 22:06, Robert Millan wrote:
>> On Mon, May 07, 2007 at 09:23:08PM +0200, Yoshinori K. Okuji wrote:
>> > On Monday 07 May 2007 10:21, Robert Millan wrote:
>> > > I think it would be reasonable to allow grub-probe to work without
>> > > arguments. Any comments?
>> >
>> > Why do you think so?
>>
>> Because it's commonly invoked while debugging. The uninitiated might have
>> some trouble figuring out the right parameter (specialy if they're not
>> debugging themselves, but providing information for someone else to debug
>> e.g. via BTS).
>
> The right parameter depends on system status. For instance, if you are trying
> to install GRUB from an installer, and a boot partition is mounted at
> somewhere else (e.g. /mnt/boot), it won't work correctly, anyway. I prefer
> that grub-probe gets an argument explicitly, so that the user can at least
> understand that grub-probe probes a certain directory.
I agree on that with Okuji. It'll get messy and difficult to guess if
the calling result is right or not.
--
O T A V I O S A L V A D O R
---------------------------------------------
E-mail: otavio@debian.org UIN: 5906116
GNU/Linux User: 239058 GPG ID: 49A5F855
Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
you the whole house."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: grub-probe without arguments
2007-05-08 20:19 ` Yoshinori K. Okuji
2007-05-08 20:27 ` Otavio Salvador
@ 2007-05-09 15:18 ` Robert Millan
1 sibling, 0 replies; 6+ messages in thread
From: Robert Millan @ 2007-05-09 15:18 UTC (permalink / raw)
To: The development of GRUB 2
On Tue, May 08, 2007 at 10:19:30PM +0200, Yoshinori K. Okuji wrote:
> On Monday 07 May 2007 22:06, Robert Millan wrote:
> > On Mon, May 07, 2007 at 09:23:08PM +0200, Yoshinori K. Okuji wrote:
> > > On Monday 07 May 2007 10:21, Robert Millan wrote:
> > > > I think it would be reasonable to allow grub-probe to work without
> > > > arguments. Any comments?
> > >
> > > Why do you think so?
> >
> > Because it's commonly invoked while debugging. The uninitiated might have
> > some trouble figuring out the right parameter (specialy if they're not
> > debugging themselves, but providing information for someone else to debug
> > e.g. via BTS).
>
> The right parameter depends on system status. For instance, if you are trying
> to install GRUB from an installer, and a boot partition is mounted at
> somewhere else (e.g. /mnt/boot), it won't work correctly, anyway. I prefer
> that grub-probe gets an argument explicitly, so that the user can at least
> understand that grub-probe probes a certain directory.
Ah, ok. I understand.
--
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] 6+ messages in thread
end of thread, other threads:[~2007-05-09 15:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-07 8:21 grub-probe without arguments Robert Millan
2007-05-07 19:23 ` Yoshinori K. Okuji
2007-05-07 20:06 ` Robert Millan
2007-05-08 20:19 ` Yoshinori K. Okuji
2007-05-08 20:27 ` Otavio Salvador
2007-05-09 15:18 ` 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.