All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: grub-devel@gnu.org
Subject: grub-probe without arguments
Date: Mon, 7 May 2007 10:21:35 +0200	[thread overview]
Message-ID: <20070507082135.GA8703@aragorn> (raw)

[-- 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);

             reply	other threads:[~2007-05-07  8:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-07  8:21 Robert Millan [this message]
2007-05-07 19:23 ` grub-probe without arguments 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070507082135.GA8703@aragorn \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.