Skip to content
Snippets Groups Projects
Commit 8db9c931 authored by jhering's avatar jhering
Browse files

fix bad return code (get STATUS) for QNX Part

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2436 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent c190f53f
No related branches found
No related tags found
No related merge requests found
CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.637 2007/11/13 14:53:27 jhering Exp $
$Id: CHANGELOG,v 1.638 2007/11/19 12:31:42 jhering Exp $
The most recent version of this file is:
http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup
......@@ -33,6 +33,8 @@ Maintainers / Developers Key:
NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[JH] fix bad return code (get STATUS) for QNX Part
[JH] initial porting to QNX Neutrino 6.3.2
need at this time a prerelease devb-eide driver and libcam.so.2
only tested for X86 Target, but devb-eide and lobcam.so.2 available for X86/ARM
......
......@@ -18,7 +18,7 @@
// should have one *_H_CVSID macro appearing below for each file
// appearing with #include "*.h" above. Please list these (below) in
// alphabetic/dictionary order.
const char *os_XXXX_c_cvsid="$Id: os_qnxnto.cpp,v 1.1 2007/11/13 14:53:27 jhering Exp $" \
const char *os_XXXX_c_cvsid="$Id: os_qnxnto.cpp,v 1.2 2007/11/19 12:32:12 jhering Exp $" \
ATACMDS_H_CVSID CONFIG_H_CVSID INT64_H_CVSID OS_QNXNTO_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID;
......@@ -359,11 +359,15 @@ int status,rc;
}
// execute now
if((status=ata_pass_thru(fd,&cpt))==EOK)
{
rc=status==EOK?0:-1;
if(cpt.cam_status!=CAM_REQ_CMP)
{
ata_interpret_sense(&cpt,&sense,&status,0);
rc=status==EOK?0:1;
if((command==STATUS||command==STATUS_CHECK)&&status==EOK)
if(command==STATUS||command==STATUS_CHECK)
rc=((sense.desc.lba_high<<8)|sense.desc.lba_mid)==ATA_SMART_SIG?0:1;
}
}
if(command==CHECK_POWER_MODE)
data[0]=cdb->ata_pass_thru.sector_count;
// finish
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment