From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HkyZS-0008Im-Aw for mharc-grub-devel@gnu.org; Mon, 07 May 2007 04:27:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HkyZQ-0008Ic-1w for grub-devel@gnu.org; Mon, 07 May 2007 04:27:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HkyZO-0008IO-HN for grub-devel@gnu.org; Mon, 07 May 2007 04:27:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HkyZO-0008IL-BG for grub-devel@gnu.org; Mon, 07 May 2007 04:27:46 -0400 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HkySQ-0004xo-TL for grub-devel@gnu.org; Mon, 07 May 2007 04:20:35 -0400 Received: from [192.168.10.6] (helo=aragorn) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1HkySG-0007gW-Vc for grub-devel@gnu.org; Mon, 07 May 2007 10:20:25 +0200 Received: from rmh by aragorn with local (Exim 4.63) (envelope-from ) id 1HkyTP-0002HK-U3 for grub-devel@gnu.org; Mon, 07 May 2007 10:21:35 +0200 Date: Mon, 7 May 2007 10:21:35 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20070507082135.GA8703@aragorn> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: Genre and OS details not recognized. Subject: grub-probe without arguments X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2007 08:27:48 -0000 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --ZGiS0Q5IWpPtfppv Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="probe_without_arg.diff" 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); --ZGiS0Q5IWpPtfppv--