From 091fa0b554882d86e305c2175f608be26a2fd4dc Mon Sep 17 00:00:00 2001 From: Antonio Huete Jimenez Date: Mon, 17 Jun 2013 15:41:14 +0200 Subject: [PATCH] hammer - Allow userland programs to access hammer.h definitions Expose hammer.h to userland, programs like fstat(1) might need some of the structs (dirfs_node). --- sys/vfs/hammer/hammer.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/vfs/hammer/hammer.h b/sys/vfs/hammer/hammer.h index a851422..aa6c934 100644 --- a/sys/vfs/hammer/hammer.h +++ b/sys/vfs/hammer/hammer.h @@ -38,9 +38,13 @@ #include #include +#ifdef _KERNEL #include +#endif #include +#ifdef _KERNEL #include +#endif #include #include #include @@ -59,8 +63,10 @@ #include #include +#ifdef _KERNEL #include #include +#endif #include "hammer_disk.h" #include "hammer_mount.h" @@ -1536,6 +1542,7 @@ hammer_checkspace(hammer_mount_t hmp, int slop) #endif +#ifdef _KERNEL static __inline void hammer_wait_mem_record(hammer_record_t record) { @@ -1606,6 +1613,7 @@ hammer_modify_node_done(hammer_node_t node) } hammer_modify_buffer_done(node->buffer); } +#endif #define hammer_modify_volume_field(trans, vol, field) \ hammer_modify_volume(trans, vol, &(vol)->ondisk->field, \ @@ -1615,6 +1623,7 @@ hammer_modify_node_done(hammer_node_t node) hammer_modify_node(trans, node, &(node)->ondisk->field, \ sizeof((node)->ondisk->field)) +#ifdef _KERNEL /* * The HAMMER_INODE_CAP_DIR_LOCAL_INO capability is set on newly * created directories for HAMMER version 2 or greater and causes @@ -1632,3 +1641,4 @@ hammer_dir_localization(hammer_inode_t dip) else return(HAMMER_LOCALIZE_MISC); } +#endif -- 1.8.2.3