]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - os_generic.cpp
Enhance dh_clean to clean up better
[mirror_smartmontools-debian.git] / os_generic.cpp
index d57e17f81962ed3b1c9505db72add3ca7346d39e..09998335c75aca7f83f4b7d5fcbbbd6800c33269 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * os_generic.c
+ * os_generic.cpp
  *
  * Home page of code is: http://smartmontools.sourceforge.net
  *
@@ -13,8 +13,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, see <http://www.gnu.org/licenses/>.
+ *
  */
 
 
@@ -71,6 +71,7 @@
 
 // These are needed to define prototypes and structures for the
 // functions defined below
+#include "int64.h"
 #include "atacmds.h"
 #include "utility.h"
 
@@ -82,8 +83,8 @@
 // should have one *_H_CVSID macro appearing below for each file
 // appearing with #include "*.h" above.  Please list these (below) in
 // alphabetic/dictionary order.
-const char *os_XXXX_c_cvsid="$Id: os_generic.cpp,v 1.28 2009/01/20 00:31:17 dlukes Exp $" \
-ATACMDS_H_CVSID CONFIG_H_CVSID OS_GENERIC_H_CVSID UTILITY_H_CVSID;
+const char * os_XXXX_cpp_cvsid="$Id: os_generic.cpp 3579 2012-07-20 17:50:12Z chrfranke $"
+  ATACMDS_H_CVSID CONFIG_H_CVSID INT64_H_CVSID OS_GENERIC_H_CVSID UTILITY_H_CVSID;
 
 // This is here to prevent compiler warnings for unused arguments of
 // functions.
@@ -106,8 +107,6 @@ static void unsupported(){
 
   if (!warninggiven) {
     char *osname;
-    extern unsigned char debugmode;
-    unsigned char savedebugmode=debugmode;
     
 #ifdef HAVE_UNAME
     struct utsname ostype;
@@ -117,14 +116,12 @@ static void unsupported(){
     osname="host's";
 #endif
 
-    debugmode=1;
     pout("\n"
          "############################################################################\n"
          "WARNING: smartmontools has not been ported to the %s Operating System.\n"
          "Please see the files os_generic.cpp and os_generic.h for porting instructions.\n"
          "############################################################################\n\n",
          osname);
-    debugmode=savedebugmode;
     warninggiven=1;
   }
   
@@ -175,7 +172,7 @@ public:
   virtual const char * get_os_version_str();
 #endif
 
-  virtual const char * get_app_examples(const char * appname);
+  virtual std::string get_app_examples(const char * appname);
 
   virtual bool scan_smart_devices(smart_device_list & devlist, const char * type,
     const char * pattern = 0);
@@ -189,7 +186,7 @@ protected:
 
   virtual smart_device * get_custom_smart_device(const char * name, const char * type);
 
-  virtual const char * get_valid_custom_dev_types_str();
+  virtual std::string get_valid_custom_dev_types_str();
 };
 
 
@@ -203,11 +200,11 @@ const char * generic_smart_interface::get_os_version_str()
 }
 #endif
 
-const char * generic_smart_interface::get_app_examples(const char * appname)
+std::string generic_smart_interface::get_app_examples(const char * appname)
 {
   if (!strcmp(appname, "smartctl"))
     ::print_smartctl_examples(); // this prints to stdout ...
-  return 0; // ... so don't print again.
+  return ""; // ... so don't print again.
 }
 
 // Return ATA device object for the given device name or NULL
@@ -267,7 +264,7 @@ smart_device * generic_smart_interface::get_custom_smart_device(const char * nam
   return NULL;
 }
 
-const char * generic_smart_interface::get_valid_custom_dev_types_str()
+std::string generic_smart_interface::get_valid_custom_dev_types_str()
 {
   return "";
 }