From 9cd588d1cf0fe22009924016f119eed12abe1ed0 Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Sun, 21 Oct 2007 16:18:51 +0000 Subject: - Allow smartctl to interact with SCSI /dev/pass devices, thus enabling it to work with RAID controllers that expose disks via these devices. Submitted by: scottl --- .../files/patch-os__freebsd.cpp | 29 +++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'sysutils/smartmontools-devel/files/patch-os__freebsd.cpp') diff --git a/sysutils/smartmontools-devel/files/patch-os__freebsd.cpp b/sysutils/smartmontools-devel/files/patch-os__freebsd.cpp index 7a20564c8cb9..8521192345c1 100644 --- a/sysutils/smartmontools-devel/files/patch-os__freebsd.cpp +++ b/sysutils/smartmontools-devel/files/patch-os__freebsd.cpp @@ -1,9 +1,26 @@ - -$FreeBSD$ - ---- os_freebsd.cpp.orig -+++ os_freebsd.cpp -@@ -1008,7 +1008,7 @@ +--- os_freebsd.cpp.orig 2006-09-17 05:17:53.000000000 +0200 ++++ os_freebsd.cpp 2007-10-21 18:09:02.000000000 +0200 +@@ -873,6 +873,7 @@ + static const char * fbsd_dev_prefix = "/dev/"; + static const char * fbsd_dev_ata_disk_prefix = "ad"; + static const char * fbsd_dev_scsi_disk_plus = "da"; ++static const char * fbsd_dev_scsi_pass = "pass"; + static const char * fbsd_dev_scsi_tape1 = "sa"; + static const char * fbsd_dev_scsi_tape2 = "nsa"; + static const char * fbsd_dev_scsi_tape3 = "esa"; +@@ -908,6 +909,11 @@ + return CONTROLLER_ATA; + } + ++ // form /dev/pass* or pass* ++ if (!strncmp(fbsd_dev_scsi_pass, dev_name, ++ strlen(fbsd_dev_scsi_pass))) ++ goto handlescsi; ++ + // form /dev/da* or da* + if (!strncmp(fbsd_dev_scsi_disk_plus, dev_name, + strlen(fbsd_dev_scsi_disk_plus))) +@@ -1008,7 +1014,7 @@ // to first list. Turn on NOCHECK for second call. This results in no // error if no more matches found, however it does append the actual // pattern to the list of paths.... -- cgit v1.2.3