#include "config.h"
-#if defined(linux)
+#if defined(linux) || defined(__linux__)
# include <sys/ioctl.h>
# ifdef HAVE_LINUX_COMPILER_H
# include <linux/compiler.h>
# define _HAVE_CCISS
#elif defined(__FreeBSD_kernel__)
# include <endian.h>
+# ifdef __GLIBC__
+# include <bsd/sys/cdefs.h>
+# include <stdint.h>
+# endif
# include CISS_LOCATION
# define _HAVE_CCISS
#endif
#include "scsicmds.h"
#include "utility.h"
-const char * cciss_cpp_cvsid = "$Id: cciss.cpp 3446 2011-10-13 22:36:28Z samm2 $"
+const char * cciss_cpp_cvsid = "$Id: cciss.cpp 4156 2015-10-18 12:20:40Z samm2 $"
CCISS_H_CVSID;
typedef struct _ReportLUNdata_struct
unsigned char pBuf[512] = {0};
unsigned char phylun[8] = {0};
int iBufLen = 512;
- int status = -1;
int len = 0; // used later in the code.
- status = cciss_getlun(device, target, phylun, report);
+ int status = cciss_getlun(device, target, phylun, report);
if (report > 0)
printf(" cciss_getlun(%d, %d) = 0x%x; scsi3addr: %02x %02x %02x %02x %02x %02x %02x %02x\n",
device, target, status,
if ((err = ioctl(fd, CCISS_PASSTHRU, &iocommand)))
{
- fprintf(stderr, "CCISS ioctl error %d (fd %d CDBLen %d buf_size %d)\n",
+ fprintf(stderr, "CCISS ioctl error %d (fd %d CDBLen %u buf_size %u)\n",
fd, err, CDBlen, size);
}
return err;