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

(-)Discussion

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>

 

(-)Attached Files

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

No files currently attached

 

(-)Dependencies

Depends on the following items: None found

Items that depend on this one: None found

 

(+)Mail Notification Carbon-Copy List

(+)Votes

(+)History

Back to the top

Powered by Savane 3.14-ee00.
Corresponding source code