summaryrefslogtreecommitdiffstats
path: root/pcilib
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib')
-rw-r--r--pcilib/error.h2
-rw-r--r--pcilib/plugin.c10
-rw-r--r--pcilib/version.h.in6
3 files changed, 13 insertions, 5 deletions
diff --git a/pcilib/error.h b/pcilib/error.h
index e94fd25..511f43d 100644
--- a/pcilib/error.h
+++ b/pcilib/error.h
@@ -33,7 +33,7 @@ void pcilib_log_vmessage(const char *file, int line, pcilib_log_priority_t prio,
pcilib_log_message(__FILE__, __LINE__, prio, __VA_ARGS__)
#define pcilib_error(...) pcilib_log(PCILIB_LOG_ERROR, __VA_ARGS__)
-#define pcilib_warning(...) pcilib_log(PCILIB_LOG_WARNING, __VA_ARGS__)
+#define pcilib_warning(...) pcilib_log(PCILIB_LOG_WARNING, __VA_ARGS__)
#define pcilib_info(...) pcilib_log(PCILIB_LOG_INFO, __VA_ARGS__)
diff --git a/pcilib/plugin.c b/pcilib/plugin.c
index 3202e95..141016c 100644
--- a/pcilib/plugin.c
+++ b/pcilib/plugin.c
@@ -54,7 +54,15 @@ const pcilib_model_description_t *pcilib_get_plugin_model(pcilib_t *pcilib, void
if (!model_info) return model_info;
if ((PCILIB_VERSION_GET_MAJOR(model_info->interface_version) != PCILIB_VERSION_MAJOR)||(PCILIB_VERSION_GET_MINOR(model_info->interface_version) != PCILIB_VERSION_MINOR)) {
- pcilib_warning("Plugin %s exposes outdated interface version (%lu), pcitool supports (%lu)", model_info->name, model_info->interface_version, PCILIB_EVENT_INTERFACE_VERSION);
+ printf("%u %u\n", model_info->interface_version, PCILIB_EVENT_INTERFACE_VERSION);
+ pcilib_warning("Plugin %s exposes outdated interface version (%u.%u.%u), pcilib interface version is (%u.%u.%u)", model_info->name,
+ PCILIB_VERSION_GET_MAJOR(model_info->interface_version),
+ PCILIB_VERSION_GET_MINOR(model_info->interface_version),
+ PCILIB_VERSION_GET_MICRO(model_info->interface_version),
+ PCILIB_VERSION_GET_MAJOR(PCILIB_EVENT_INTERFACE_VERSION),
+ PCILIB_VERSION_GET_MINOR(PCILIB_EVENT_INTERFACE_VERSION),
+ PCILIB_VERSION_GET_MICRO(PCILIB_EVENT_INTERFACE_VERSION)
+ );
return NULL;
}
diff --git a/pcilib/version.h.in b/pcilib/version.h.in
index 6eb3b20..0940913 100644
--- a/pcilib/version.h.in
+++ b/pcilib/version.h.in
@@ -6,9 +6,9 @@
#define PCILIB_VERSION_MICRO ${PCILIB_VERSION_MICRO}
#define PCILIB_MAKE_VERSION(major, minor, micro) ((major<<16)|(minor<<8)|(micro))
-#define PCILIB_VERSION_GET_MAJOR(version) ((version>>16)&&0xFF)
-#define PCILIB_VERSION_GET_MINOR(version) ((version>>8)&&0xFF)
-#define PCILIB_VERSION_GET_MICRO(version) ((version)&&0xFF)
+#define PCILIB_VERSION_GET_MAJOR(version) ((version>>16)&0xFF)
+#define PCILIB_VERSION_GET_MINOR(version) ((version>>8)&0xFF)
+#define PCILIB_VERSION_GET_MICRO(version) ((version)&0xFF)
#define PCILIB_VERSION PCILIB_MAKE_VERSION(PCILIB_VERSION_MAJOR, PCILIB_VERSION_MINOR, PCILIB_VERSION_MICRO)