X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fhdd.h;h=c24ceb5cb77988f7a49b6a2d0482a59d99e391e1;hb=c1e20f2631a1249720e9c75d753eacfcb0f6c7b9;hp=f7cbeb6e33aac4bed6174df62b5b3d26b21a3d4d;hpb=7a7b46f5b74ea2bfbbcf7da5951b24efaed4b21f;p=psensor.git diff --git a/src/lib/hdd.h b/src/lib/hdd.h index f7cbeb6..c24ceb5 100644 --- a/src/lib/hdd.h +++ b/src/lib/hdd.h @@ -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 @@ -19,17 +19,27 @@ #ifndef _PSENSOR_HDD_H_ #define _PSENSOR_HDD_H_ -#include "config.h" -#include "psensor.h" +#include +#include +#include -#ifdef HAVE_ATASMART -void atasmart_psensor_list_append(struct psensor ***sensors, int values_length); -void atasmart_psensor_list_update(struct psensor **sensors); -#endif +#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 -struct psensor **hddtemp_psensor_list_add(struct psensor **sensors, - int values_max_length); +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) {} + +#endif +void hddtemp_psensor_list_append(struct psensor ***sensors, int values_length); void hddtemp_psensor_list_update(struct psensor **sensors); #endif