From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fq9Sl-0005RA-EL for mharc-grub-devel@gnu.org; Tue, 13 Jun 2006 10:01:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fq9Si-0005Ko-1q for grub-devel@gnu.org; Tue, 13 Jun 2006 10:01:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fq9Sg-0005IR-6E for grub-devel@gnu.org; Tue, 13 Jun 2006 10:01:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fq9Sf-0005I4-V0 for grub-devel@gnu.org; Tue, 13 Jun 2006 10:01:42 -0400 Received: from [207.69.195.66] (helo=pop-canoe.atl.sa.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fq9bd-0007Xb-83 for grub-devel@gnu.org; Tue, 13 Jun 2006 10:10:57 -0400 Received: from user-0vvde2g.cable.mindspring.com ([63.246.184.80] helo=[192.168.0.103]) by pop-canoe.atl.sa.earthlink.net with esmtp (Exim 3.36 #10) id 1Fq9Sf-0007NN-00 for grub-devel@gnu.org; Tue, 13 Jun 2006 10:01:41 -0400 From: Hollis Blanchard To: The development of GRUB 2 In-Reply-To: <448EB6E5.9070300@raulete.net> References: <448EB6E5.9070300@raulete.net> Content-Type: text/plain Date: Tue, 13 Jun 2006 09:01:38 -0500 Message-Id: <1150207298.11076.4.camel@diesel> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 (2.6.1-1.fc5.2) Content-Transfer-Encoding: 7bit Subject: Re: test -e command for grub2 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: Tue, 13 Jun 2006 14:01:44 -0000 On Tue, 2006-06-13 at 15:00 +0200, adrian15 wrote: > I attach then new test.c for grub2. (I worked from Grub 1.94 version). > > It only implements the test -e feature. > I haven't been able to check it. ./configure says something about a LZO > version. You haven't even compiled it? Perhaps you should install the LZO libraries you need. > 1) Why cat uses the file = grub_gzfile_open (args[0], 1); sentence to > check if a file can be opened or not? Is it cat supposed to cat also > gzipped files? I guess so. > Is it better for me to use grub_gzfile_open on my test command? Probably not, since you're just testing for existence. > 2) I've done this: > > static const struct grub_arg_option options[] = > { > {"file", 'e', 0, "test if a file exists", 0, 0}, > {0, 0, 0, 0, 0, 0} > }; > > copying-pasting from search.c but I do not understand it too much... if > this is repeated in test.c and search.c the compiler should complain... > isn't it ? No, it's static. > 3) And you're free to tell to only attach patchs instead of the full > file... and you're free to tell me an url for a gnu c syntax or > convention as far as I do not know if the gnu project has any. And, of > course, tell me if it compiles or not. Google for GNU Coding Style. Then, since that document is incomplete, you will need to mimic the style you see elsewhere in GRUB. > P.S.: I am going to update from Knoppix 4 to Knoppix 5 soon and I think > I won't hae the lzo problem. Try installing the LZO development package on Knoppix 4. -Hollis