diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-23 04:25:52 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-23 04:25:52 -0400 |
commit | 7c95682509cf22ad3ec3e3576c725824e880c980 (patch) | |
tree | ffe4a0b8a6e6c7660eccbaa7752e8ac033d3e37f | |
parent | 7ae350b758a5a295879d28a360a3c61f25ba0aca (diff) | |
download | dbfs-7c95682509cf22ad3ec3e3576c725824e880c980.tar.gz |
dbfs: Move definitions to dbfs.h.
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | dbfs.c | 41 | ||||
-rw-r--r-- | dbfs.h | 44 |
3 files changed, 46 insertions, 41 deletions
diff --git a/Makefile.am b/Makefile.am index 133ec66..e2d1d36 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,7 @@ sbin_PROGRAMS = ndbfs dbfs ndbfs_SOURCES = ndbfs.c ndbfs_LDADD = @GNET_LIBS@ @FUSE_LIBS@ -dbfs_SOURCES = dbfs.c +dbfs_SOURCES = dbfs.c dbfs.h dbfs_LDADD = @GNET_LIBS@ @FUSE_LIBS@ @DB_LIBS@ EXTRA_DIST = autogen.sh @@ -11,49 +11,10 @@ #include <assert.h> #include <glib.h> #include <db.h> +#include "dbfs.h" static const char *hello_str = "Hello World!\n"; -enum { - DBFS_BLK_ID_LEN = 20, -}; - -enum { - DBFS_DE_MAGIC = 0xd4d4d4d4U, -}; - -typedef struct { - char buf[DBFS_BLK_ID_LEN]; -} dbfs_blk_id_t; - -struct dbfs_dirent { - guint32 magic; - guint16 res2; - guint16 namelen; - guint64 ino; - char name[0]; -}; - -struct dbfs_extent { - dbfs_blk_id_t id; - guint64 size; -}; - -struct dbfs_raw_inode { - guint64 ino; - guint64 generation; - guint32 mode; - guint32 nlink; - guint32 uid; - guint32 gid; - guint64 rdev; - guint64 size; - guint64 ctime; - guint64 atime; - guint64 mtime; - struct dbfs_extent blocks[0]; -}; - struct dbfs_inode { unsigned int n_extents; struct dbfs_raw_inode raw_inode; @@ -0,0 +1,44 @@ +#ifndef __DBFS_H__ +#define __DBFS_H__ + +enum { + DBFS_BLK_ID_LEN = 20, +}; + +enum { + DBFS_DE_MAGIC = 0xd4d4d4d4U, +}; + +typedef struct { + char buf[DBFS_BLK_ID_LEN]; +} dbfs_blk_id_t; + +struct dbfs_dirent { + guint32 magic; + guint16 res2; + guint16 namelen; + guint64 ino; + char name[0]; +}; + +struct dbfs_extent { + dbfs_blk_id_t id; + guint64 size; +}; + +struct dbfs_raw_inode { + guint64 ino; + guint64 generation; + guint32 mode; + guint32 nlink; + guint32 uid; + guint32 gid; + guint64 rdev; + guint64 size; + guint64 ctime; + guint64 atime; + guint64 mtime; + struct dbfs_extent blocks[0]; +}; + +#endif /* __DBFS_H__ */ |