Comments (2)
Thanks for bringing that to my attention. There has been a big code re-arrangement under both sg_inq and sg_vpd since both output more or less the same VPD pages. When I was looking at JSON output, I realized that duplicating the code for sg_inq and sg_vpd was pretty wasteful. My thinking with -H (especially used multiple times) has evolved over time, and I use it a lot for testing since it can now be parsed (with the --inhex=FN option). I'm in the middle of adding the "cappid" changes (see the newly released sbc5r04.pdf and spc6r07.pdf), so it will be a few days before (svn) revision 999 hits this mirror. Hopefully that revision will improve the 'sg_inq -HH' and 'sg_vpd -HH' handling. They should output VPD pages in hex, with a running address/index in the first column, and with no ASCII rendering to the right. Hmmm, that contradicts what 'man sg3_utils' says under the '--hex' option. I need to sort this out ....
from sg3_utils.
Recently checked-in svn revision 999 and it is mirrored here. Lots of --hex option related changes. The broad thrust is to follow what 'man sg3_utils(8)' says about that option. When used once, 16 bytes (or less) are output on each line with a leading address or index at the start of each line (starting at 0). When used twice, an ASCII rendering of the data is appended to each line. When used more than twice, the output is meant to be parsable. That means no leading address/index nor ASCII rendering to the right, just the hex bytes. But there are corner cases such as 'sg_inq -p ai -HHH' which outputs 16 bit hexadecimal words (little endian) suitable as input for hdparm to accept as input and decode. Using '-HHHHH' or one less in many utilities then each VPD, log, etc page is prefixed by a blank line and then a comment line starting with '#' followed by the name of that page. Thereafter that page is output in hex. So that output is both easy to parse and can also be cut up with a text editor to remove pages that are not of interest. The simplifies handling something like: 'sg_vpd -p all -HHHHH <scsi_device_node>'.
As for checked in code failing to compile, that seems strange. Before I check-in code I run clang -analyze and g++ -std=c++23 on it. Once it is checked in, github runs the code on many architectures and reports any warnings or errors to me. Note that recently I removed ./configure and all the Makefile.in files and their supports. So now ./autogen.sh or ./bootstrap needs to be run to generate ./configure and friends. The downside of that change is the ./autogen.sh needs autoconf installed. The upside is that it removed over 49,000 line of code from my svn and git repositories.
from sg3_utils.
Related Issues (15)
- Identify device output for SATA on big endian HOT 11
- The sorting order of the output numeric part is out of order HOT 3
- shared library SONAME HOT 2
- rescan_scsi_bus.sh: Why it's pointless to do a target scan on FC ? HOT 3
- rescan-scsi-bus.sh: function "findremapped" is too slow when there is 1K luns on server,is there any way to solve it? HOT 5
- rescan-scsi-bus.sh: when there is a logical lun-0, testonline will spend 30s to retry-check it HOT 6
- invalid VPD response; probably a STANDARD INQUIRY response HOT 2
- Regression in sgp_dd command HOT 4
- Input parameter handling for sg_wr_mode fails... HOT 3
- sg_logs: output for Device Statistics page (14h), serial numbers should be strings? HOT 5
- rescan-scsi-bus.sh: -r flag unmounts active root disk HOT 3
- Something weird happened in windows... please help me understand. HOT 3
- interaction between sg_start and systemd-udevd may spin-up disk immediately after spin-down HOT 4
- sg_ses: order of low_crit and low_warn thresholds is mixed for `--get` command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sg3_utils.