Regression in sgp_dd command
sshedi opened this issue · 4 comments
Hi @doug-gilbert,
There seems to be a regression in sgp_dd command. Please see the following log.
root@phdev:~/sg3_utils # sgp_dd if=/dev/null of=sg3 bs=512 count=1
>>>> Some error occurred, remaining blocks=-3
remaining block count=1
0+0 records in
0+0 records out
This is in version 1.47 and there in the current HEAD as well. Please let me know if I'm using the tool wrong. Thanks.
This seems like a corner case. Reading /dev/null yields EOF so its length is 0 bytes. So the only misreporting above is "remaining blocks=-3". Overall, is it an error? Probably because it was asked to copy one 512 byte block (to stdout). Thoughts?
I called it a regression because this works fine in v1.46
so, the behavior should be preserved right?
In v1.46 it reports the request count was not copied but returns an exit status of 0. That was changed in v1.47 to considering that as an error. v1.47 has been out for 18 months and I will shortly release v1.48 . I believe that it is an error and shouldn't be quietly ignored. So I plan to keep the v1.47 action. Just put up a new version that fixes the "remaining blocks=-3" part and that should be now remaining blocks=1 . Thanks for reporting this.
Thanks for the inputs. Yes, what you said makes sense. Closing this.