diff options
author | Joshua Bakita <jbakita@cs.unc.edu> | 2021-09-22 11:25:08 -0400 |
---|---|---|
committer | Joshua Bakita <jbakita@cs.unc.edu> | 2021-09-22 11:25:08 -0400 |
commit | a7564070dcdf75de4f848af936e3d76ed01833e1 (patch) | |
tree | ab092e765d76b0698fd9dcab750e36638c500d50 | |
parent | b69863043538d9fd4590acb249124526772a80ea (diff) |
Include git hash as version number and print startup message
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | nvdebug_entry.c | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -1,5 +1,6 @@ | |||
1 | obj-m += nvdebug.o | 1 | obj-m += nvdebug.o |
2 | nvdebug-objs = runlist_procfs.o runlist.o nvdebug_entry.o | 2 | nvdebug-objs = runlist_procfs.o runlist.o nvdebug_entry.o |
3 | KBUILD_CFLAGS += -DGIT_HASH=\"$(shell git --git-dir=$(PWD)/.git rev-parse --short HEAD)\" | ||
3 | 4 | ||
4 | # TODO: Avoid needing to distribute NVIDIA's headers (at least they're MIT...) | 5 | # TODO: Avoid needing to distribute NVIDIA's headers (at least they're MIT...) |
5 | #ccflags-y += -I$(PWD)/include | 6 | #ccflags-y += -I$(PWD)/include |
diff --git a/nvdebug_entry.c b/nvdebug_entry.c index 148bd3f..6346659 100644 --- a/nvdebug_entry.c +++ b/nvdebug_entry.c | |||
@@ -28,6 +28,7 @@ int __init nvdebug_init(void) { | |||
28 | printk(KERN_ERR "[nvdebug] Unable to initialize procfs entries!\n"); | 28 | printk(KERN_ERR "[nvdebug] Unable to initialize procfs entries!\n"); |
29 | return -ENOMEM; | 29 | return -ENOMEM; |
30 | } | 30 | } |
31 | printk(KERN_INFO "[nvdebug] Module version "GIT_HASH" initialized\n"); | ||
31 | return 0; | 32 | return 0; |
32 | } | 33 | } |
33 | 34 | ||