Bug 1254084

Summary: There is messy code under the output of command 'sg_dd'
Product: Red Hat Enterprise Linux 7 Reporter: Gu Nini <ngu>
Component: sg3_utilsAssignee: David Sommerseth <davids>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.2CC: michen, ovasik, qzhang, shuyu, thuth, xuhan, xuma, zhengtli
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-24 11:02:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gu Nini 2015-08-17 07:01:26 UTC
Description of problem:
When issue SCSI INQUIRY related command 'sg_dd' in as ppc64 le host/guest, there is some messy code under the output.

Version-Release number of selected component (if applicable):
Host kernel: 3.10.0-304.el7.ppc64le
sg3_utils: sg3_utils-1.37-5.el7.ppc64le

How reproducible:
100%


Steps to Reproduce:
1. Install the latest sg3_utils on a ppc64le host/guest

2. Create a scsi_debug disk in the host/guest:
#modprobe scsi_debug lbpu=1 lbpws=1
#lsscsi
......
[0:2:4:0]    disk    IBM      IPR-0   5DBA7D00       /dev/sde 
[0:3:0:0]    no dev  IBM      57D7001SISIOA    0150  -        
[1:0:0:0]    disk    Linux    scsi_debug       0004  /dev/sdf

3. Issue command 'sg_dd' for the scsi_debug disk in the host/guest:
[root@ibm-p8-rhevm-10 home]# sg_dd if=/dev/sdf blk_sgio=1 bs=512 count=1
a%c
   !�8U�1+0 records in
1+0 records out

Actual results:
There is messy code in the command output as showed in step3

Expected results:
There isn't any messy code in the command output

Additional info:

Comment 2 Thomas Huth 2015-08-20 19:19:40 UTC
I think this is not a bug: Since you did not specify the "of=..." paramater here, the output of the read buffer gets written to stdout, causing these strange characters. If you want to suppress the output, simply use something like "of=/dev/null" or so as additional parameter.

Comment 3 Gu Nini 2015-08-24 11:02:09 UTC
(In reply to Thomas Huth from comment #2)
> I think this is not a bug: Since you did not specify the "of=..." paramater
> here, the output of the read buffer gets written to stdout, causing these
> strange characters. If you want to suppress the output, simply use something
> like "of=/dev/null" or so as additional parameter.

Thomas,

You are right, thanks, close the bug directly.