]> git.saurik.com Git - apple/xnu.git/blob - bsd/ufs/ufs/ufs_byte_order.h
fda8614fda0ad4cdd42810e3a6959dbcbd6be546
[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(unsigned long long *, int);
45 void byte_swap_ints(int *, int);
46 void byte_swap_shorts(short *, int);
47
48 /* void byte_swap_superblock(struct fs *); */
49 void byte_swap_sbin(struct fs *);
50 void byte_swap_sbout(struct fs *);
51 void byte_swap_csum(struct csum *);
52 void byte_swap_ocylgroup(struct cg *);
53 void byte_swap_cgin(struct cg *, struct fs *);
54 void byte_swap_cgout(struct cg *, struct fs *);
55
56 void byte_swap_inode_in(struct dinode *, struct inode *);
57 void byte_swap_inode_out(struct inode *, struct dinode *);
58
59 void byte_swap_dir_block_in(char *, int);
60 void byte_swap_dir_block_out(buf_t);
61 void byte_swap_direct(struct direct *);
62 void byte_swap_dirtemplate_in(struct dirtemplate *);
63 void byte_swap_minidir_in(struct direct *);
64
65 #endif /* __APPLE_API_PRIVATE */
66 #endif /* _UFS_BYTE_ORDER_H_ */
67 #endif /* KERNEL_PRIVATE */