Comments (3)
I tend to use the sdparm utility instead of sg_wr_mode. The existing code probably worked as long as -c or -C was the last option. Anyway svn rev 1048 now mirrored here should fix it. Could you test it? And if you have a general test script (or just a hex file for input) could you send it to me and I can put it in the inhex directory?
from sg3_utils.
Hi Doug,
And thanks for the quick reply.
I can confirm that the parameter handling now works.
Placing the -c/-C option as a last one didn't make any difference because when the while loop for scanning the parameters is done (no more arguments found), the optarg content is returned as NULL.
Unfortunately, I can't provide any general test script for this. I have several scripts for multiple internal test cases and this was just one that started failing. I did used sdparm to do a one off test to verify that the functionality of the device was OK but since I'm mostly using these sg_utils for range of tests, I thought that it would be great to have this still fixed. I like the approach you have in here, easy to track down what is the problem, in case there is one :)
Thanks for the good job!
Affe
from sg3_utils.
Inspired by this bug fix, I added a --mfile=MF option so that the mask data could also be placed in a separate file (svn rev: 1049]. Then in the inhex directory the wr_mode_cont.hex and wr_mode_mask.hex files have been added. Now those files can be used together with the Linux scsi_debug driver to turn off and on the WCE bit. (i.e. Write Cache Enable).
from sg3_utils.
Related Issues (13)
- 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
- Identify device output for SATA on big endian HOT 11
- Strange behavior of sg_inq -HH option HOT 2
- invalid VPD response; probably a STANDARD INQUIRY response HOT 2
- Regression in sgp_dd command HOT 4
- 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
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.