Skip to content
Snippets Groups Projects
Commit c68f5b06 authored by samm2's avatar samm2
Browse files

FreeBSD: moved cciss header checking to the open() function

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2943 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent b7bdc3e2
No related branches found
No related tags found
No related merge requests found
...@@ -1152,7 +1152,11 @@ bool freebsd_cciss_device::open() ...@@ -1152,7 +1152,11 @@ bool freebsd_cciss_device::open()
{ {
const char *dev = get_dev_name(); const char *dev = get_dev_name();
int fd; int fd;
#ifndef HAVE_DEV_CISS_CISSIO_H
pout("CCISS support is not available in this build of smartmontools,\n"
"/usr/src/sys/dev/ciss/cissio.h was not available at build time.\n\n");
return false;
#endif
if ((fd = ::open(dev,O_RDWR))<0) { if ((fd = ::open(dev,O_RDWR))<0) {
perror("open failed"); perror("open failed");
return false; return false;
...@@ -1177,16 +1181,6 @@ bool freebsd_cciss_device::scsi_pass_through(scsi_cmnd_io * iop) ...@@ -1177,16 +1181,6 @@ bool freebsd_cciss_device::scsi_pass_through(scsi_cmnd_io * iop)
if (status < 0) if (status < 0)
return set_err(-status); return set_err(-status);
return true; return true;
#else
{
static int warned = 0;
if (!warned) {
pout("CCISS support is not available in this build of smartmontools,\n"
"/usr/src/sys/dev/ciss/cissio.h was not available at build time.\n\n");
warned = 1;
}
}
return -ENOSYS;
#endif #endif
// not reached // not reached
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment