This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIRFS IMPLEMENTATION DRAFT | |
IN-MEMORY NODES (DIRFS NODES) | |
struct dirfs node have a pointer to their parent, this way there is no need for | |
them to be kept in any data structure (RB-trees, LIST, TAILQ). | |
Every dirfs node keeps a refcnt which indicates how many nodes it is parenting | |
and the node cannot be destroyed as long as it contains references. One of the | |
advantages of having a pointer to the parent is that you can recurse backwards | |
and find out the whole path of a node. For dirfs this is extremely useful as |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <strings.h> | |
#include <string.h> | |
#define BASE "/myroot/" | |
struct node { | |
char data[128]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Main tasks to be performed. | |
* 1) When inode is NULL recycle the vnode | |
* 2) When the inode has 0 links: | |
* - Check if in the TAILQ, if so remove. | |
* - Destroy the inode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/sys/vfs/tmpfs/tmpfs_subr.c b/sys/vfs/tmpfs/tmpfs_subr.c | |
index 678fd1d..8310b88 100644 | |
--- a/sys/vfs/tmpfs/tmpfs_subr.c | |
+++ b/sys/vfs/tmpfs/tmpfs_subr.c | |
@@ -1032,29 +1032,10 @@ tmpfs_chflags(struct vnode *vp, int vaflags, struct ucred *cred) | |
return EROFS; | |
error = vop_helper_setattr_flags(&flags, vaflags, node->tn_uid, cred); | |
- /* | |
- * Unprivileged processes are not permitted to unset system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#define WS " \t\r\n" | |
#define LIBHAMMER_MAXCFGOPTS 6 | |
#define TOSTR(n) #n | |
enum libhammer_cfglist { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/libhammer/Makefile b/lib/libhammer/Makefile | |
index e306021..d88ff51 100644 | |
--- a/lib/libhammer/Makefile | |
+++ b/lib/libhammer/Makefile | |
@@ -1,7 +1,7 @@ | |
# DragonflyBSD Makefile | |
LIB= hammer | |
-SRCS= crc32.c info.c misc.c stats.c | |
+SRCS= crc32.c info.c misc.c stats.c config.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 025c7794f89c68e80fe75c041b74b475388b1e2e Mon Sep 17 00:00:00 2001 | |
From: Antonio Huete Jimenez <[email protected]> | |
Date: Sun, 29 Dec 2013 21:45:34 +0100 | |
Subject: [PATCH] libhammer - Add a function to calculate PFS paths. | |
--- | |
lib/libhammer/libhammer.h | 1 + | |
lib/libhammer/misc.c | 20 ++++++++++++++++++++ | |
2 files changed, 21 insertions(+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <err.h> | |
#define KEYFILE "otpkey.dat" | |
#define MAXMSGLEN 1024 | |
char ktext[MAXMSGLEN] = {0}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <err.h> | |
#include <unistd.h> | |
#define MAXMSGLEN 1024 | |
char ktext[MAXMSGLEN] = {0}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dumped core - see /var/crash/vmcore.0 | |
Tue Feb 25 21:47:16 CET 2014 | |
Version String: DragonFly v3.6.1.6.g1507ff-RELEASE #1: Tue Feb 25 11:12:19 CET 2014 root@:/usr/obj/usr/src/sys/GENERIC | |
panic: bgetvp - overlapping buffer | |
GNU gdb (GDB) 7.6.1 | |
Copyright (C) 2013 Free Software Foundation, Inc. |