Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
sg3_utils
sg3_fixup-tab-in-inquiry
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sg3_fixup-tab-in-inquiry of Package sg3_utils
Index: sg3_utils-1.27/src/sg_inq.c =================================================================== --- sg3_utils-1.27.orig/src/sg_inq.c +++ sg3_utils-1.27/src/sg_inq.c @@ -1773,10 +1773,19 @@ process_std_inq(int sg_fd, const struct printf(" Inquiry response length=%d, no vendor, " "product or revision data\n", act_len); else { + int i; + if (act_len < SAFE_STD_INQ_RESP_LEN) rsp_buff[act_len] = '\0'; memcpy(xtra_buff, &rsp_buff[8], 8); xtra_buff[8] = '\0'; + /* Fixup any tab characters */ + i = 0; + while (i < 8) { + if (xtra_buff[i] == 0x09) + xtra_buff[i] = ' '; + i++; + } printf(" Vendor identification: %s\n", xtra_buff); if (act_len <= 16) printf(" Product identification: <none>\n");
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor