summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2021-09-22 11:25:08 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2021-09-22 11:25:08 -0400
commita7564070dcdf75de4f848af936e3d76ed01833e1 (patch)
treeab092e765d76b0698fd9dcab750e36638c500d50
parentb69863043538d9fd4590acb249124526772a80ea (diff)
Include git hash as version number and print startup message
-rw-r--r--Makefile1
-rw-r--r--nvdebug_entry.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5d61177..18c07e8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
1obj-m += nvdebug.o 1obj-m += nvdebug.o
2nvdebug-objs = runlist_procfs.o runlist.o nvdebug_entry.o 2nvdebug-objs = runlist_procfs.o runlist.o nvdebug_entry.o
3KBUILD_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