Imported Upstream version 1.2.0
[psensor-pkg-debian.git] / src / lib / hdd.h
index 8d4c316..c24ceb5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2014 jeanfi@gmail.com
+ * Copyright (C) 2010-2016 jeanfi@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
 #ifndef _PSENSOR_HDD_H_
 #define _PSENSOR_HDD_H_
 
-#include "config.h"
-#include "psensor.h"
+#include <bool.h>
+#include <config.h>
+#include <psensor.h>
+
+#if defined(HAVE_ATASMART) && HAVE_ATASMART
+
+static inline bool atasmart_is_supported(void) { return true; }
+
+void atasmart_psensor_list_append(struct psensor ***, int);
+void atasmart_psensor_list_update(struct psensor **);
+
+#else
+
+static inline bool atasmart_is_supported(void) { return false; }
+
+static inline void atasmart_psensor_list_append(struct psensor ***s, int n) {}
+static inline void atasmart_psensor_list_update(struct psensor **s) {}
 
-#ifdef HAVE_ATASMART
-void atasmart_psensor_list_append(struct psensor ***sensors, int values_length);
-void atasmart_psensor_list_update(struct psensor **sensors);
 #endif
 
 void hddtemp_psensor_list_append(struct psensor ***sensors, int values_length);