All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis@penguinppc.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: test -e command for grub2
Date: Tue, 13 Jun 2006 09:01:38 -0500	[thread overview]
Message-ID: <1150207298.11076.4.camel@diesel> (raw)
In-Reply-To: <448EB6E5.9070300@raulete.net>

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




      reply	other threads:[~2006-06-13 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 13:00 test -e command for grub2 adrian15
2006-06-13 14:01 ` Hollis Blanchard [this message]

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=1150207298.11076.4.camel@diesel \
    --to=hollis@penguinppc.org \
    --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.