Permalink
Browse files

Fix compiler warnings and cleanup ebbcharmutex

* Cleaned up compiler warnings related to format strings
* Removed/Ignored files that don't need to be tracked
* Fixed Makefile clean target to remove test program
  • Loading branch information...
Kyle LeBlanc
Kyle LeBlanc committed Oct 10, 2016
1 parent 27e2ecd commit ef7d6f3ea5cc1b28f21ce55fa62fefc01f27e787
@@ -0,0 +1 @@
+test
@@ -5,3 +5,4 @@ all:
$(CC) testebbcharmutex.c -o test
clean:
make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean
+ rm test
@@ -154,9 +154,9 @@ static ssize_t dev_read(struct file *filep, char *buffer, size_t len, loff_t *of
*/
static ssize_t dev_write(struct file *filep, const char *buffer, size_t len, loff_t *offset){
- sprintf(message, "%s(%d letters)", buffer, len); // appending received string with its length
+ sprintf(message, "%s(%zu letters)", buffer, len); // appending received string with its length
size_of_message = strlen(message); // store the length of the stored message
- printk(KERN_INFO "EBBChar: Received %d characters from the user\n", len);
+ printk(KERN_INFO "EBBChar: Received %zu characters from the user\n", len);
return len;
}
Binary file not shown.
@@ -13,6 +13,7 @@
#include<errno.h>
#include<fcntl.h>
#include<string.h>
+#include<unistd.h>
#define BUFFER_LENGTH 256 ///< The buffer length (crude but fine)
static char receive[BUFFER_LENGTH]; ///< The receive buffer from the LKM

0 comments on commit ef7d6f3

Please sign in to comment.