We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7e0c9b commit 4e2ededCopy full SHA for 4e2eded
Makefile
@@ -1,6 +1,5 @@
1
obj-m += simplefs.o
2
-simplefs-objs := fs.o super.o inode.o file.o dir.o extent.o
3
-
+simplefs-objs := fs.o super.o inode.o file.o dir.o extent.o symlink.o hash.o
4
KDIR ?= /lib/modules/$(shell uname -r)/build
5
6
MKFS = mkfs.simplefs
hash.c
@@ -0,0 +1,13 @@
+#include <linux/types.h>
+#include "simplefs.h"
+
+uint64_t fnv1a_64(const char *str)
+{
+ uint64_t h = 0xcbf29ce484222325ULL;
7
+ while (*str) {
8
+ h ^= (unsigned char)(*str++);
9
+ h *= 0x100000001b3ULL;
10
+ }
11
+ return h;
12
+}
13
0 commit comments