I think it would be reasonable to allow grub-probe to work without arguments.
Any comments?

-- 
Robert Millan

My spam trap is [EMAIL PROTECTED]  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.
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);
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to