diff --git a/kfusd/Makefile b/kfusd/Makefile index bc6b32d..cbd837f 100755 --- a/kfusd/Makefile +++ b/kfusd/Makefile @@ -5,11 +5,11 @@ else KDIR ?= /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) ROOTFS ?= - +GIT_DESCRIBE = $(shell git describe --dirty --tags) KERNEL_VER ?= 2.6.32.7 default: - $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) EXTRA_CFLAGS=-I$(PWD)/../include modules + $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) EXTRA_CFLAGS="-I$(PWD)/../include -DGIT_DESCRIBE='\"${GIT_DESCRIBE}\"'" V=1 modules install: install -d -m 0755 $(ROOTFS)/lib/modules/$(KERNEL_VER)/kernel/drivers/misc diff --git a/kfusd/kfusd.c b/kfusd/kfusd.c index 92e555f..2abc589 100755 --- a/kfusd/kfusd.c +++ b/kfusd/kfusd.c @@ -90,6 +90,9 @@ #define STATIC +#ifndef GIT_DESCRIBE +#define GIT_DESCRIBE "unknownversion-dirty" +#endif /* Define this if you want to emit debug messages (adds ~8K) */ //#define CONFIG_FUSD_DEBUG @@ -284,7 +287,8 @@ DEFINE_SEMAPHORE (fusd_devlist_sem); //#ifdef MODULE_LICENSE MODULE_AUTHOR ("Jeremy Elson (c)2001"); -MODULE_AUTHOR ("Manoel Trapier (c)2009-2012"); +MODULE_AUTHOR ("Manoel Trapier (c)2009-2018"); +MODULE_VERSION(GIT_DESCRIBE); MODULE_LICENSE ("GPL"); //#endif