From: Itxaka serrano <itxakaserrano@gmail.com>
To: grub-devel@gnu.org
Subject: grub shell: unkown commands alwasy exit with zero code
Date: Fri, 12 Jan 2024 17:58:02 +0100 [thread overview]
Message-ID: <CALzkbDDTz5JayD+OE3gNznQchdckN6QFVrtHWaXaLGanVi4aoA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 678 bytes --]
Hey all,
I opened a bug because this behaviour doesnt seem correct to me:
https://savannah.gnu.org/bugs/?65154
Example:
grub> hello
error: ../../grub-core/script/function.c:119:can't find command `hello'.
grub> echo $?
0
Kind of weird because on the code it seems like its returning a
GRUB_ERR_UNKNOWN_COMMAND which should not be zero. I had a quick look and
maybe its becuase on line 1018 of grub-core/script/execute.c we print the
error but always return 0
https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/script/execute.c#n1018
Is this expected behaviour or is it a mistake and we should not only print
the error but return the actual error?
Cheers,
Itxaka
[-- Attachment #1.2: Type: text/html, Size: 1103 bytes --]
[-- Attachment #2: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next reply other threads:[~2024-01-12 21:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 16:58 Itxaka serrano [this message]
2024-01-16 8:32 ` grub shell: unkown commands alwasy exit with zero code Michael Chang via Grub-devel
2024-01-17 3:03 ` Vladimir 'phcoder' Serbinenko
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=CALzkbDDTz5JayD+OE3gNznQchdckN6QFVrtHWaXaLGanVi4aoA@mail.gmail.com \
--to=itxakaserrano@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).