URL:
  <http://savannah.gnu.org/bugs/?32449>

                 Summary: function return value clamped to 0 or 1
                 Project: GNU GRUB
            Submitted by: joshtriplett
            Submitted on: Sat 12 Feb 2011 11:14:40 PM PST
                Category: None
                Severity: Major
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 
                 Release: Bazaar - trunk
         Reproducibility: Every Time
         Planned Release: None

    _______________________________________________________

Details:

Originally reported as http://bugs.debian.org/612992


The grub manual says that the return statement will use its argument as
the exit code of the function.  However, all non-zero exit codes seem to
get clamped to 1:

grub> function f { return 0 ; } ; f ; echo $?
0
grub> function f { return 1 ; } ; f ; echo $?
1
grub> function f { return 2 ; } ; f ; echo $?
1
grub> function f { return 42 ; } ; f ; echo $?
1





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32449>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to