Skip to main content
Sign in
Snippets Groups Projects
Commit 16874d8d authored by ballen4705's avatar ballen4705
Browse files

Fixed broken logic in detection of normal busy error on captive self test ioctl

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@74 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent d7e67ef3
No related branches found
No related tags found
No related merge requests found
// $Id: atacmds.c,v 1.13 2002/10/21 16:00:47 ballen4705 Exp $
// $Id: atacmds.c,v 1.14 2002/10/21 16:11:58 ballen4705 Exp $
/*
* atacmds.c
*
......@@ -549,7 +549,8 @@ int ataSmartTest(int device, int testtype){
printf("Sending command: \"%s\".\n",cmdmsg);
// Now send the command to test
if ((errornum=ioctl(device , HDIO_DRIVE_CMD, parms)) && errornum!=EIO){
errornum=ioctl(device, HDIO_DRIVE_CMD, parms);
if (!(errornum && errno==EIO && (testtype=SHORT_CAPTIVE_SELF_TEST || testtype==EXTEND_CAPTIVE_SELF_TEST))){
char errormsg[128];
sprintf(errormsg,"Command \"%s\" failed.",cmdmsg);
perror (errormsg);
......
......
// $Id: atacmds.cpp,v 1.13 2002/10/21 16:00:47 ballen4705 Exp $
// $Id: atacmds.cpp,v 1.14 2002/10/21 16:11:58 ballen4705 Exp $
/*
* atacmds.c
*
......@@ -549,7 +549,8 @@ int ataSmartTest(int device, int testtype){
printf("Sending command: \"%s\".\n",cmdmsg);
// Now send the command to test
if ((errornum=ioctl(device , HDIO_DRIVE_CMD, parms)) && errornum!=EIO){
errornum=ioctl(device, HDIO_DRIVE_CMD, parms);
if (!(errornum && errno==EIO && (testtype=SHORT_CAPTIVE_SELF_TEST || testtype==EXTEND_CAPTIVE_SELF_TEST))){
char errormsg[128];
sprintf(errormsg,"Command \"%s\" failed.",cmdmsg);
perror (errormsg);
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment