X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fhdd.h;h=c24ceb5cb77988f7a49b6a2d0482a59d99e391e1;hb=790c76c1fb187bdc358e0a34e4edcf428d6c8970;hp=08aa851051551f214afe59283eb2d6745941ca49;hpb=8bb5f793ac36d135cd2e1fbe06d4f0940c4377d4;p=psensor.git diff --git a/src/lib/hdd.h b/src/lib/hdd.h index 08aa851..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,12 +19,24 @@ #ifndef _PSENSOR_HDD_H_ #define _PSENSOR_HDD_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); +#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) {} + #endif void hddtemp_psensor_list_append(struct psensor ***sensors, int values_length);