diff options
author | Davidlohr Bueso | 2011-05-11 19:16:00 +0200 |
---|---|---|
committer | Karel Zak | 2011-05-17 16:30:08 +0200 |
commit | 06f25585085e2efcc1bfebbbfc31ff5db7af707b (patch) | |
tree | aefb7bdb5c132167144be9be0f127a84d1eefc0f /disk-utils/cramfs.h | |
parent | chrt: clarify use of -a option (diff) | |
download | kernel-qcow2-util-linux-06f25585085e2efcc1bfebbbfc31ff5db7af707b.tar.gz kernel-qcow2-util-linux-06f25585085e2efcc1bfebbbfc31ff5db7af707b.tar.xz kernel-qcow2-util-linux-06f25585085e2efcc1bfebbbfc31ff5db7af707b.zip |
cramfs: remove cramfs_common.h
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@gnu.org>
Diffstat (limited to 'disk-utils/cramfs.h')
-rw-r--r-- | disk-utils/cramfs.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/disk-utils/cramfs.h b/disk-utils/cramfs.h index 34b32ca1d..ba4ba7fbc 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 |