baruch / diskscan

Scan disk for bad or near failure sectors, performs disk diagnostics
GNU General Public License v3.0
108 stars 29 forks source link

Data not in standard format (0 but expected 2) #60

Closed pepa65 closed 7 years ago

pepa65 commented 7 years ago

Repo builds fine, but running it like diskscan /dev/sdb gives:

diskscan version 0.19

V: Verbosity set
I: Validating path /dev/sdb
Data not in standard format (0 but expected 2)
I: Failed to parse the inquiry data
E: Can't identify disk for path /dev/sdb, errno=0: Success
I: Closed disk 

What is happening here??

This happened with a 2.5" SATA drive, and then also with a 3.5" SATA drive. Is it because of the reader hardware? (Must the drives be directly plugged into a SATA port??)

baruch commented 7 years ago

I believe that the inquiry request got an incorrect format report. master branch has a fix to remove this check and then things should work. Can you please verify this?

pepa65 commented 7 years ago

I was using the master branch...

pepa65 commented 7 years ago

I have now commented out the if clause that gives this error, and it appears to be doing something. I'll report back.

pepa65 commented 7 years ago

Now it is working well. Would you like a patch or PR?

baruch commented 7 years ago

This is already in master, so no need for it. I need to see if I have any more fixes pending and maybe just release a new version so this will stop being an issue to people installing the latest version.

Thanks for the verification!

pepa65 commented 7 years ago

No, current master doesn't work. You have to remove the line return false that comes after fprintf(stderr, "Data not in standard format (%d but expected 2)\n", fmt); in file libscsicmd/src/parse_inquiry.c.

baruch commented 7 years ago

OK. libscsicmd is another project of mine. I'll update that as well as this project. Thanks!

baruch commented 7 years ago

I pushed a fix now in commit 18b68bf9ef00159359c9d7e3bb8e4a561b8f16f3