Skip to content
Snippets Groups Projects
Commit d24e5ca0 authored by ballen4705's avatar ballen4705
Browse files

Cleaned up with strerror()

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@373 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 2619efab
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
#include <stdlib.h>
#include "atacmds.h"
const char *CVSid1="$Id: atacmds.c,v 1.45 2002/12/12 13:42:59 ballen4705 Exp $" CVSID1;
const char *CVSid1="$Id: atacmds.c,v 1.46 2002/12/12 13:55:54 ballen4705 Exp $" CVSID1;
// These Drive Identity tables are taken from hdparm 5.2, and are also
// given in the ATA/ATAPI specs for the IDENTIFY DEVICE command. Note
......@@ -122,10 +122,7 @@ void syserror(const char *message){
const char *errormessage;
// Get the correct system error message:
if (errno<sys_nerr)
errormessage=sys_errlist[errno];
else
errormessage="unrecognized system error";
errormessage=strerror(errno);
// Check that caller has handed a sensible string, and provide
// appropriate output. See perrror(3) man page to understand better.
......
......@@ -29,7 +29,7 @@
#include <stdlib.h>
#include "atacmds.h"
const char *CVSid1="$Id: atacmds.cpp,v 1.45 2002/12/12 13:42:59 ballen4705 Exp $" CVSID1;
const char *CVSid1="$Id: atacmds.cpp,v 1.46 2002/12/12 13:55:54 ballen4705 Exp $" CVSID1;
// These Drive Identity tables are taken from hdparm 5.2, and are also
// given in the ATA/ATAPI specs for the IDENTIFY DEVICE command. Note
......@@ -122,10 +122,7 @@ void syserror(const char *message){
const char *errormessage;
// Get the correct system error message:
if (errno<sys_nerr)
errormessage=sys_errlist[errno];
else
errormessage="unrecognized system error";
errormessage=strerror(errno);
// Check that caller has handed a sensible string, and provide
// appropriate output. See perrror(3) man page to understand better.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment