xref: /aosp_15_r20/external/e2fsprogs/lib/ext2fs/native.c (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Worker /*
2*6a54128fSAndroid Build Coastguard Worker  * native.c --- returns the ext2_flag for a native byte order
3*6a54128fSAndroid Build Coastguard Worker  *
4*6a54128fSAndroid Build Coastguard Worker  * Copyright (C) 1996 Theodore Ts'o.
5*6a54128fSAndroid Build Coastguard Worker  *
6*6a54128fSAndroid Build Coastguard Worker  * %Begin-Header%
7*6a54128fSAndroid Build Coastguard Worker  * This file may be redistributed under the terms of the GNU Library
8*6a54128fSAndroid Build Coastguard Worker  * General Public License, version 2.
9*6a54128fSAndroid Build Coastguard Worker  * %End-Header%
10*6a54128fSAndroid Build Coastguard Worker  */
11*6a54128fSAndroid Build Coastguard Worker 
12*6a54128fSAndroid Build Coastguard Worker #include "config.h"
13*6a54128fSAndroid Build Coastguard Worker #include <stdio.h>
14*6a54128fSAndroid Build Coastguard Worker 
15*6a54128fSAndroid Build Coastguard Worker #include "ext2_fs.h"
16*6a54128fSAndroid Build Coastguard Worker #include "ext2fs.h"
17*6a54128fSAndroid Build Coastguard Worker 
ext2fs_native_flag(void)18*6a54128fSAndroid Build Coastguard Worker int ext2fs_native_flag(void)
19*6a54128fSAndroid Build Coastguard Worker {
20*6a54128fSAndroid Build Coastguard Worker #ifdef WORDS_BIGENDIAN
21*6a54128fSAndroid Build Coastguard Worker 	return EXT2_FLAG_SWAP_BYTES;
22*6a54128fSAndroid Build Coastguard Worker #else
23*6a54128fSAndroid Build Coastguard Worker 	return 0;
24*6a54128fSAndroid Build Coastguard Worker #endif
25*6a54128fSAndroid Build Coastguard Worker }
26*6a54128fSAndroid Build Coastguard Worker 
27*6a54128fSAndroid Build Coastguard Worker 
28*6a54128fSAndroid Build Coastguard Worker 
29