Giter VIP home page Giter VIP logo

Comments (3)

doug-gilbert avatar doug-gilbert commented on July 30, 2024

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.

AffeHMT avatar AffeHMT commented on July 30, 2024

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.

doug-gilbert avatar doug-gilbert commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.