All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Gerards <mgerards@xs4all.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: How to call a command from another one
Date: Tue, 12 Jun 2007 19:16:48 +0200	[thread overview]
Message-ID: <87abv5ytxb.fsf@xs4all.nl> (raw)
In-Reply-To: <466EA924.6090100@raulete.net> (adrian15@raulete.net's message of "Tue, 12 Jun 2007 16:09:40 +0200")

adrian15 <adrian15@raulete.net> writes:

> Robert Millan escribió:
>> On Tue, Jun 12, 2007 at 01:57:11PM +0200, adrian15 wrote:
>>> Hi,
>>>
>>> 	I want to implement the pause command so that it is the same thing as
>>> the echo command with all of its options and also that it stops.
>> I don't know how to call other commands, but in this case, maybe grub_printf()
>> will be good enough?
>
> I agree with you but...
>
> I think it would be a good idea to have a pause message that has the
> same options as the echo command because the echo command has some
> nice options and because I like to reuse code.

Make them share the same file.  Call grub_cmd_echo with the same
arguments which are used for pause.  Before and after that you can do
whatever you want.  The disadvantage of this approach is that the set
of arguments should be the same.

--
Marco




      reply	other threads:[~2007-06-12 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-12 11:57 How to call a command from another one adrian15
2007-06-12 14:16 ` Robert Millan
2007-06-12 14:09   ` adrian15
2007-06-12 17:16     ` Marco Gerards [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=87abv5ytxb.fsf@xs4all.nl \
    --to=mgerards@xs4all.nl \
    --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.