Bug 705400 - dasdinfo return 0 if action failed
Summary: dasdinfo return 0 if action failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: s390utils
Version: 5.7
Hardware: s390x
OS: Linux
high
high
Target Milestone: rc
: 5.8
Assignee: Dan Horák
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 690969 705404
TreeView+ depends on / blocked
 
Reported: 2011-05-17 15:20 UTC by Petr Sklenar
Modified: 2012-02-21 06:34 UTC (History)
6 users (show)

Fixed In Version: s390utils-1.8.1-17.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 705404 (view as bug list)
Environment:
Last Closed: 2012-02-21 06:15:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
s390-tools-rhel5-dasdinfo-returncode.patch (895 bytes, text/plain)
2011-05-23 10:00 UTC, IBM Bug Proxy
no flags Details


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 72189 0 None None None Never
Red Hat Product Errata RHBA-2012:0243 0 normal SHIPPED_LIVE s390utils bug fix update 2012-02-20 15:07:23 UTC

Description Petr Sklenar 2011-05-17 15:20:52 UTC
Description of problem:
dasdinfo return 0 if action failed.

Version-Release number of selected component (if applicable):
s390utils-1.8.1-16.el5

How reproducible:
always

Steps to Reproduce:
use dasdinfo in a wrong way, place wahtever string into block device

[root@ibm-z10-32 /]# dasdinfo -b /dev/write_whatever_here -l
Error: could not read unique DASD ID
[root@ibm-z10-32 /]# echo $?
0
[root@ibm-z10-32 /]# dasdinfo -b /dev/write_whatever_here -u
Error: could not read unique DASD ID
[root@ibm-z10-32 /]# echo $?
0
[root@ibm-z10-32 /]# dasdinfo -b /dev/write_whatever_here -x
Error: could not read unique DASD ID
[root@ibm-z10-32 /]# echo $?
0


Actual results:
return code = 0

Expected results:
return code = 1 or more

Additional info:

Comment 1 IBM Bug Proxy 2011-05-23 10:00:27 UTC
------- Comment From brueckner.ibm.com 2011-05-23 05:58 EDT-------
The patch has been tested, fixes the problem, and will be included in the next
upstream release of the s390-tools.

With best regards,
Hendrik

Comment 2 IBM Bug Proxy 2011-05-23 10:00:30 UTC
Created attachment 500383 [details]
s390-tools-rhel5-dasdinfo-returncode.patch


------- Comment on attachment From brueckner.ibm.com 2011-05-23 05:58 EDT-------


Description: dasdinfo: return error code in case of failure.
Symptom:     The dasdinfo tool always returns 0 even in case of an error.
Problem:     If the tool is used in a script the return code can not be used
	     since it is always 0.
Solution:    Give a non zero return value in case of an error.

Comment 3 RHEL Program Management 2011-09-23 00:48:00 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 9 IBM Bug Proxy 2012-01-03 10:30:48 UTC
------- Comment From abdhalee.com 2012-01-03 05:21 EDT-------
Hi,

I tested it on RHEL5.8 S1, and the problem is fixed, now I am able to see proper return code.

[root@h4215037 ~]# rpm -qa s390*
s390utils-1.8.1-17.el5
[root@h4215037 ~]# uname -a
Linux h4215037 2.6.18-301.el5 #1 SMP Tue Dec 13 16:55:37 EST 2011 s390x s390x s390x GNU/Linux

[root@h4215037 ~]# dasdinfo -b /dev/write_whatever_here -l
[root@h4215037 ~]# echo  $?
255

Thanks for your support !

------- Comment From abdhalee.com 2012-01-03 05:22 EDT-------
closing this bugzilla as it is fixed.

Comment 10 errata-xmlrpc 2012-02-21 06:15:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0243.html


Note You need to log in before you can comment on or make changes to this bug.