bugGNU GRUB - Bugs: bug #32449, function return value clamped to 0...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #32449: function return value clamped to 0 or 1

Submitter:  Josh Triplett <joshtriplett>
Submitted:  Sun 13 Feb 2011 07:14:40 AM UTC
   
 
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  Reproducibility:  Every Time
Planned Release:  None

Sun 13 Feb 2011 07:14:40 AM UTC, original submission:  

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


Josh Triplett <joshtriplett>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Updated the item)
  • -email is unavailable- added by joshtriplett (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-02-21 phcoder StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code