2 * cramfs_common - cramfs common code
4 * Copyright (c) 2008 Roy Peled, the.roy.peled -at- gmail
5 * Copyright (c) 2004-2006 by Michael Holzt, kju -at- fqdn.org
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
19 #ifndef __CRAMFS_COMMON_H
20 #define __CRAMFS_COMMON_H
24 #ifndef HOST_IS_BIG_ENDIAN
25 #ifdef WORDS_BIGENDIAN
26 #define HOST_IS_BIG_ENDIAN 1
28 #define HOST_IS_BIG_ENDIAN 0
32 u32 u32_toggle_endianness(int big_endian, u32 what);
33 void super_toggle_endianness(int from_big_endian, struct cramfs_super *super);
34 void inode_to_host(int from_big_endian, struct cramfs_inode *inode_in, struct cramfs_inode *inode_out);
35 void inode_from_host(int to_big_endian, struct cramfs_inode *inode_in, struct cramfs_inode *inode_out);