Permalink
Browse files

Cleaned up ebbchar compiler warnings etc

* 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 5c62461 commit 27e2ecd6d2a93972978295819522c220bc0e213b
View
@@ -9,6 +9,7 @@
*.symvers
*.order
*.mod.c
+*.ko
# Retain shared libraries .so and static libraries .a for the exploringBB repo
@@ -0,0 +1 @@
+test
@@ -5,3 +5,4 @@ all:
$(CC) testebbchar.c -o test
clean:
make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean
+ rm test
@@ -142,9 +142,9 @@ static ssize_t dev_read(struct file *filep, char *buffer, size_t len, loff_t *of
* @param offset The offset if required
*/
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.
View
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 27e2ecd

Please sign in to comment.