]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - smartctl.cpp
Imported Upstream version 6.3+svn3990
[mirror_smartmontools-debian.git] / smartctl.cpp
index 61c7c93e30c0be72a36ef543fc1aff81c71b5480..bbaec43859f8f5d9bcb0ccb0b3acbc250d37fa90 100644 (file)
@@ -4,7 +4,7 @@
  * Home page of code is: http://smartmontools.sourceforge.net
  *
  * Copyright (C) 2002-11 Bruce Allen <smartmontools-support@lists.sourceforge.net>
- * Copyright (C) 2008-12 Christian Franke <smartmontools-support@lists.sourceforge.net>
+ * Copyright (C) 2008-14 Christian Franke <smartmontools-support@lists.sourceforge.net>
  * Copyright (C) 2000 Michael Cornwell <cornwell@acm.org>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -26,6 +26,7 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <string.h>
+#include <stdlib.h>
 #include <stdarg.h>
 #include <stdexcept>
 #include <getopt.h>
@@ -50,7 +51,7 @@
 #include "smartctl.h"
 #include "utility.h"
 
-const char * smartctl_cpp_cvsid = "$Id: smartctl.cpp 3826 2013-07-06 21:57:29Z samm2 $"
+const char * smartctl_cpp_cvsid = "$Id: smartctl.cpp 3936 2014-07-05 17:16:23Z chrfranke $"
   CONFIG_H_CVSID SMARTCTL_H_CVSID;
 
 // Globals to control printing
@@ -724,7 +725,7 @@ static const char * parse_options(int argc, char** argv,
         } else {
           if (ataopts.smart_selective_args.num_spans >= 5 || start > stop) {
             if (start > stop) {
-              snprintf(extraerror, sizeof(extraerror), "ERROR: Start LBA (%"PRIu64") > ending LBA (%"PRId64") in argument \"%s\"\n",
+              snprintf(extraerror, sizeof(extraerror), "ERROR: Start LBA (%" PRIu64 ") > ending LBA (%" PRId64 ") in argument \"%s\"\n",
                 start, stop, optarg);
             } else {
               snprintf(extraerror, sizeof(extraerror),"ERROR: No more than five selective self-test spans may be"
@@ -1212,8 +1213,8 @@ void scan_devices(const char * type, bool with_open, char ** argv)
 // Main program without exception handling
 static int main_worker(int argc, char **argv)
 {
-  // Throw if CPU endianess does not match compile time test.
-  check_endianness();
+  // Throw if runtime environment does not match compile time test.
+  check_config();
 
   // Initialize interface
   smart_interface::init();