From: edgar.soldin@web.de
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: lua 'grub.run' does not return message text
Date: Sun, 17 Jan 2010 01:21:30 +0100 [thread overview]
Message-ID: <4B52580A.3000704@web.de> (raw)
In-Reply-To: <9dd6c8711001161548y24d7f872n213081fbef30ba7e@mail.gmail.com>
thanks .. I am gonna double check this. Are their other undocumented
variables like grub_errmsg. Where should I look for documentation? I'd
also look at the source if necessary.
About what I am doing. I found the listiso scripts
http://ubuntuforums.org/showthread.php?t=1288604
while trying to get them up and running they silently died because of
missing modules. Essentially I wanted to parse lsmod. Because that's
currently not possible I simply check if insmod fails or not.
Do you have an idea on how to parse grub.run output in the current state
of the lua module?
Thanks again .. ede
On 17.01.2010 00:48, Jordan Uggla wrote:
> On Thu, Jan 14, 2010 at 1:12 PM,<edgar.soldin@web.de> wrote:
>> When I run
>>
>> err,msg = grub.run("ls")
>>
>> only the variable err is filled with the exit code.
>> msg is still nil .. I saw documentation that grub.run is supposed to return
>> the output in the second variable.
>
> In the latest bzr ( pushed a few minutes ago ) the interface matches
> what is documented in http://grub.enbug.org/LUASupport . Be careful
> though, it's only the error message that is returned, not the output
> of "ls". And an error message is only returned if there is an error.
> For example:
>
> errno, err_msg = grub.run( "ls /boot") --Outputs "grub/"
> print( errno, err_msg ) -- Outputs "0 nil"
>
> errno, err_msg = grub.run( "ls /boot/nonexistent" ) -- Outputs nothing
> print( errno, err_msg ) -- Outputs "5 file not found"
>
> If you want to actually list and store devices / files from lua you
> should use grub.enum_device() and grub.enum_file() .
>
prev parent reply other threads:[~2010-01-17 0:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 21:12 lua 'grub.run' does not return message text edgar.soldin
2010-01-15 23:52 ` Jordan Uggla
2010-01-16 0:04 ` Jordan Uggla
2010-01-16 23:48 ` Jordan Uggla
2010-01-17 0:21 ` edgar.soldin [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=4B52580A.3000704@web.de \
--to=edgar.soldin@web.de \
--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.