Add inode map, and the start of file extent items
[btrfs-progs-unstable/devel.git] / hasher.c
blob96702da4329c1ec0831d049c07cd5cdf5c4c5561
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include "kerncompat.h"
5 #include "hash.h"
7 int main() {
8 u64 result;
9 int ret;
10 char line[255];
11 char *p;
12 while(1) {
13 p = fgets(line, 255, stdin);
14 if (!p)
15 break;
16 if (strlen(line) == 0)
17 continue;
18 ret = btrfs_name_hash(line, strlen(line), &result);
19 BUG_ON(ret);
20 printf("hash returns %Lu\n", result);
22 return 0;