]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - os_solaris.cpp
Stop passing arguments to dh_installinit
[mirror_smartmontools-debian.git] / os_solaris.cpp
index b36f700902d893f9a3f00510c678323b6f838b70..147fa1e9959e482fb0a000013e135af04ca59948 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * os_solaris.c
  *
- * Home page of code is: http://smartmontools.sourceforge.net
+ * Home page of code is: http://www.smartmontools.org
  *
- * Copyright (C) 2003-8 SAWADA Keiji <smartmontools-support@lists.sourceforge.net>
- * Copyright (C) 2003-8 Casper Dik <smartmontools-support@lists.sourceforge.net>
+ * Copyright (C) 2003-08 SAWADA Keiji
+ * Copyright (C) 2003-15 Casper Dik
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -12,8 +12,8 @@
  * any later version.
  *
  * You should have received a copy of the GNU General Public License
- * (for example COPYING); if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * (for example COPYING); if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  */
 
@@ -39,9 +39,9 @@
 
 extern long long bytes;
 
-static const char *filenameandversion="$Id: os_solaris.cpp,v 1.32 2008/06/12 21:46:31 ballen4705 Exp $";
+static const char *filenameandversion="$Id: os_solaris.cpp 4142 2015-10-14 19:05:19Z chrfranke $";
 
-const char *os_XXXX_c_cvsid="$Id: os_solaris.cpp,v 1.32 2008/06/12 21:46:31 ballen4705 Exp $" \
+const char *os_XXXX_c_cvsid="$Id: os_solaris.cpp 4142 2015-10-14 19:05:19Z chrfranke $" \
 ATACMDS_H_CVSID CONFIG_H_CVSID INT64_H_CVSID OS_SOLARIS_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID;
 
 // The printwarning() function warns about unimplemented functions
@@ -99,6 +99,7 @@ void print_smartctl_examples(){
 static const char *uscsidrvrs[] = {
         "sd",
         "ssd",
+        "disk",       // SATA devices
         "st"
 };
 
@@ -271,7 +272,7 @@ int deviceclose(int fd){
     return close(fd);
 }
 
-#if defined(__sparc)
+#if defined(WITH_SOLARIS_SPARC_ATA)
 // swap each 2-byte pairs in a sector
 static void swap_sector(void *p)
 {
@@ -285,19 +286,8 @@ static void swap_sector(void *p)
 #endif
 
 // Interface to ATA devices.  See os_linux.c
-int marvell_command_interface(int fd, smart_command_set command, int select, char *data){
-    ARGUSED(fd); ARGUSED(command); ARGUSED(select); ARGUSED(data);
-    return -1;
-}
-
-int highpoint_command_interface(int fd, smart_command_set command, int select, char *data)
-{
-    ARGUSED(fd); ARGUSED(command); ARGUSED(select); ARGUSED(data);
-    return -1;
-}
-
 int ata_command_interface(int fd, smart_command_set command, int select, char *data){
-#if defined(__sparc)
+#if defined(WITH_SOLARIS_SPARC_ATA)
     int err;
  
     switch (command){
@@ -339,7 +329,7 @@ int ata_command_interface(int fd, smart_command_set command, int select, char *d
        EXIT(1);
        break;
     }
-#else /* __sparc */
+#else /* WITH_SOLARIS_SPARC_ATA */
     ARGUSED(fd); ARGUSED(command); ARGUSED(select); ARGUSED(data);
 
     /* Above smart_* routines uses undocumented ioctls of "dada"
@@ -352,25 +342,6 @@ int ata_command_interface(int fd, smart_command_set command, int select, char *d
     return -1;
 }
 
-// Interface to ATA devices behind 3ware escalade RAID controller cards.  See os_linux.c
-int escalade_command_interface(int fd, int disknum, int escalade_type, smart_command_set command, int select, char *data){
-  ARGUSED(fd);  ARGUSED(disknum);  ARGUSED(escalade_type);
-  ARGUSED(command);  ARGUSED(select);  ARGUSED(data); 
-
-  if (printwarning(1))
-    return -1;
-  return -1;
-}
-
-int areca_command_interface(int fd, int disknum, smart_command_set command, int select, char *data){
-  ARGUSED(fd);  ARGUSED(disknum);
-  ARGUSED(command);  ARGUSED(select);  ARGUSED(data); 
-
-  if (printwarning(1))
-    return -1;
-  return -1;
-}
-
 #include <errno.h>
 #include <sys/scsi/generic/commands.h>
 #include <sys/scsi/generic/status.h>
@@ -425,7 +396,7 @@ int do_scsi_cmnd_io(int fd, struct scsi_cmnd_io * iop, int report)
   default:
     return -EINVAL;
   }
-  uscsi.uscsi_flags |= (USCSI_ISOLATE | USCSI_RQENABLE);
+  uscsi.uscsi_flags |= (USCSI_ISOLATE | USCSI_RQENABLE | USCSI_SILENT);
 
   if (ioctl(fd, USCSICMD, &uscsi)) {
     int err = errno;