Skip to content

Commit

Permalink
nullfs
Browse files Browse the repository at this point in the history
  • Loading branch information
comex committed Nov 24, 2010
1 parent 3073ddb commit 556c094
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 732 deletions.
4 changes: 4 additions & 0 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ def sandbox2():
goto('sandbox2')
compile_to_bin('sandbox', ['sandbox.S'], ['-D_patch_start=start'])

def nullfs():
goto('nullfs')
run(GCC, '-dynamiclib', '-o', 'nullfs.dylib', 'null_subr.c', 'null_vfsops.c', 'null_vnops.c', 'vfs_pasta.c', '-fwhole-program', '-combine', '-nostdinc', '-nodefaultlibs', '-lgcc', '-Wno-error', '-Wno-parentheses', '-Wno-format', '-I.', '-Ixnu', '-Ixnu/bsd', '-Ixnu/libkern', '-Ixnu/osfmk', '-Ixnu/bsd/i386', '-Ixnu/bsd/sys', '-Ixnu/EXTERNAL_HEADERS', '-Ixnu/osfmk/libsa', '-D__i386__', '-DKERNEL', '-DKERNEL_PRIVATE', '-DBSD_KERNEL_PRIVATE', '-D__APPLE_API_PRIVATE', '-DXNU_KERNEL_PRIVATE', '-flat_namespace', '-undefined', 'dynamic_lookup', '-fno-builtin-printf', '-DNULLFS_DIAGNOSTIC')

def clean():
autoclean()

Expand Down
22 changes: 0 additions & 22 deletions nullfs/Makefile

This file was deleted.

6 changes: 5 additions & 1 deletion nullfs/mount_nullfs/mount_nullfs.c → nullfs/mount_nullfs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include <sys/param.h>
#include <sys/mount.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
struct null_args {
char *target; /* Target of loopback */
};
Expand All @@ -8,5 +11,6 @@ struct null_args {
int main() {
struct null_args args;
args.target = "/y";
mount("loopback", "/x", 0, &args);
printf("%d ", mount("loopback", "/x", 0, &args));
printf("%s\n", strerror(errno));
}
7 changes: 0 additions & 7 deletions nullfs/mount_nullfs/Makefile

This file was deleted.

4 changes: 2 additions & 2 deletions nullfs/null_subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ u_long null_node_hash;
/*
* Initialise cache headers
*/
void
nullfs_init()
int nullfs_init(struct vfsconf *vfsconf)
{

#ifdef NULLFS_DIAGNOSTIC
printf("nullfs_init\n"); /* printed during system boot */
#endif
//*((unsigned int *) 0xdeadbeef) = 0xf00df00d;
null_node_hashtbl = hashinit(NNULLNODECACHE, M_CACHE, &null_node_hash);
return 0;
}

struct proc *curproc;
Expand Down
Loading

0 comments on commit 556c094

Please sign in to comment.