All of lore.kernel.org
 help / color / mirror / Atom feed
* 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

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.