/*
- * os_generic.c
+ * os_generic.cpp
*
* Home page of code is: http://smartmontools.sourceforge.net
*
* 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/>.
+ *
*/
// These are needed to define prototypes and structures for the
// functions defined below
+#include "int64.h"
#include "atacmds.h"
#include "utility.h"
// 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.
if (!warninggiven) {
char *osname;
- extern unsigned char debugmode;
- unsigned char savedebugmode=debugmode;
#ifdef HAVE_UNAME
struct utsname ostype;
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;
}
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);
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();
};
}
#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
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 "";
}