]> git.saurik.com Git - apple/xnu.git/blob - bsd/ufs/ufs/ufs_byte_order.h
12dd0badc8dd72da6f2ec689b010d6f7c4184f00
[apple/xnu.git] / bsd / ufs / ufs / ufs_byte_order.h
1 /*
2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /* Copyright 1998 Apple Computer, Inc.
23 *
24 * UFS byte swapping routines to make a big endian file system useful on a
25 * little endian machine.
26 *
27 */
28
29 #ifdef KERNEL_PRIVATE
30
31 #ifndef _UFS_BYTE_ORDER_H_
32 #define _UFS_BYTE_ORDER_H_
33
34 #include <sys/appleapiopts.h>
35
36 #ifdef __APPLE_API_PRIVATE
37 #include <rev_endian_fs.h>
38 #include <sys/vnode.h>
39 #include <sys/buf.h>
40 #include <ufs/ufs/quota.h>
41 #include <ufs/ufs/inode.h>
42 #include <ufs/ffs/fs.h>
43
44 void byte_swap_longlongs __P((unsigned long long *, int));
45 void byte_swap_ints __P((int *, int));
46 void byte_swap_shorts __P((short *, int));
47
48 /* void byte_swap_superblock __P((struct fs *)); */
49 void byte_swap_sbin __P((struct fs *));
50 void byte_swap_sbout __P((struct fs *));
51 void byte_swap_csum __P((struct csum *));
52 void byte_swap_ocylgroup __P((struct cg *));
53 void byte_swap_cgin __P((struct cg *, struct fs *));
54 void byte_swap_cgout __P((struct cg *, struct fs *));
55
56 void byte_swap_inode_in __P((struct dinode *, struct inode *));
57 void byte_swap_inode_out __P((struct inode *, struct dinode *));
58
59 void byte_swap_dir_block_in __P((char *, int));
60 void byte_swap_dir_block_out __P((struct buf *));
61 void byte_swap_direct __P((struct direct *));
62 void byte_swap_dirtemplate_in __P((struct dirtemplate *));
63 void byte_swap_minidir_in __P((struct direct *));
64
65 #endif /* __APPLE_API_PRIVATE */
66 #endif /* _UFS_BYTE_ORDER_H_ */
67 #endif /* KERNEL_PRIVATE */