[PATCH] cramfs: remove cramfs_common.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Davidlohr Bueso <dave@xxxxxxx>
Date: Wed, 11 May 2011 13:16:00 -0400

We currently have cramfs.h and cramfs_common.h, this makes no sense, so remove unite them and keep just cramfs.h

Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
I took the liberty of adding cramfs_common.h copyright to cramfs.h, hope there's no objections.

 disk-utils/Makefile.am     |    2 +-
 disk-utils/cramfs.h        |   30 ++++++++++++++++++++++++++++++
 disk-utils/cramfs_common.c |    2 +-
 disk-utils/cramfs_common.h |   37 -------------------------------------
 disk-utils/fsck.cramfs.c   |    1 -
 disk-utils/mkfs.cramfs.c   |    1 -
 6 files changed, 32 insertions(+), 41 deletions(-)
 delete mode 100644 disk-utils/cramfs_common.h

diff --git a/disk-utils/Makefile.am b/disk-utils/Makefile.am
index 5df8064..51faa27 100644
--- a/disk-utils/Makefile.am
+++ b/disk-utils/Makefile.am
@@ -60,7 +60,7 @@ endif
 endif
 
 if BUILD_CRAMFS
-cramfs_common = $(utils_common) cramfs.h cramfs_common.c cramfs_common.h
+cramfs_common = $(utils_common) cramfs.h cramfs_common.c
 sbin_PROGRAMS += fsck.cramfs mkfs.cramfs
 fsck_cramfs_SOURCES = fsck.cramfs.c $(cramfs_common)
 mkfs_cramfs_SOURCES = mkfs.cramfs.c $(cramfs_common) $(top_srcdir)/lib/md5.c
diff --git a/disk-utils/cramfs.h b/disk-utils/cramfs.h
index 34b32ca..ba4ba7f 100644
--- a/disk-utils/cramfs.h
+++ b/disk-utils/cramfs.h
@@ -1,3 +1,21 @@
+/*
+ * cramfs_common - cramfs common code
+ *
+ * Copyright (c) 2008 Roy Peled, the.roy.peled  -at-  gmail
+ * Copyright (c) 2004-2006 by Michael Holzt, kju -at- fqdn.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 #ifndef __CRAMFS_H
 #define __CRAMFS_H
 
@@ -19,6 +37,13 @@ typedef unsigned int u32;
 #define CRAMFS_NAMELEN_WIDTH 6
 #define CRAMFS_OFFSET_WIDTH 26
 
+#ifndef HOST_IS_BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
+#define HOST_IS_BIG_ENDIAN 1
+#else
+#define HOST_IS_BIG_ENDIAN 0
+#endif
+#endif
 
 /*
  * Reasonably terse representation of the inode data.
@@ -78,4 +103,9 @@ int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen);
 int cramfs_uncompress_init(void);
 int cramfs_uncompress_exit(void);
 
+u32 u32_toggle_endianness(int big_endian, u32 what);
+void super_toggle_endianness(int from_big_endian, struct cramfs_super *super);
+void inode_to_host(int from_big_endian, struct cramfs_inode *inode_in, struct cramfs_inode *inode_out);
+void inode_from_host(int to_big_endian, struct cramfs_inode *inode_in, struct cramfs_inode *inode_out);
+
 #endif
diff --git a/disk-utils/cramfs_common.c b/disk-utils/cramfs_common.c
index ffdad9b..4f679cb 100644
--- a/disk-utils/cramfs_common.c
+++ b/disk-utils/cramfs_common.c
@@ -17,7 +17,7 @@
  */
 
 #include <string.h>
-#include "cramfs_common.h"
+#include "cramfs.h"
 #include "../include/bitops.h"
 
 u32 u32_toggle_endianness(int big_endian, u32 what)
diff --git a/disk-utils/cramfs_common.h b/disk-utils/cramfs_common.h
deleted file mode 100644
index 6311bce..0000000
--- a/disk-utils/cramfs_common.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * cramfs_common - cramfs common code
- *
- * Copyright (c) 2008 Roy Peled, the.roy.peled  -at-  gmail
- * Copyright (c) 2004-2006 by Michael Holzt, kju -at- fqdn.org
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __CRAMFS_COMMON_H
-#define __CRAMFS_COMMON_H
-
-#include "cramfs.h"
-
-#ifndef HOST_IS_BIG_ENDIAN
-#ifdef WORDS_BIGENDIAN
-#define HOST_IS_BIG_ENDIAN 1
-#else
-#define HOST_IS_BIG_ENDIAN 0
-#endif
-#endif
-
-u32 u32_toggle_endianness(int big_endian, u32 what);
-void super_toggle_endianness(int from_big_endian, struct cramfs_super *super);
-void inode_to_host(int from_big_endian, struct cramfs_inode *inode_in, struct cramfs_inode *inode_out);
-void inode_from_host(int to_big_endian, struct cramfs_inode *inode_in, struct cramfs_inode *inode_out);
-
-#endif
diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c
index 09953dc..3d0c3e5 100644
--- a/disk-utils/fsck.cramfs.c
+++ b/disk-utils/fsck.cramfs.c
@@ -54,7 +54,6 @@
 #include <sys/sysmacros.h>	/* for major, minor */
 
 #include "cramfs.h"
-#include "cramfs_common.h"
 #include "nls.h"
 #include "blkdev.h"
 
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
index 5fc66b7..6767ba3 100644
--- a/disk-utils/mkfs.cramfs.c
+++ b/disk-utils/mkfs.cramfs.c
@@ -38,7 +38,6 @@
 #include <zlib.h>
 
 #include "cramfs.h"
-#include "cramfs_common.h"
 #include "md5.h"
 #include "nls.h"
 #include "mkfs.h"
-- 
1.7.4.1



--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux