]> git.saurik.com Git - apple/boot.git/blob - gen/libsaio/ufs_byteorder.h
bf5fa242d1dce798819ea811f70aeaaf71734d09
[apple/boot.git] / gen / libsaio / ufs_byteorder.h
1 /*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.1 (the "License"). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
12 * this file.
13 *
14 * The Original Code and all software distributed under the License are
15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
20 * under the License.
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24 /*
25 * Copyright (c) 1992 NeXT Computer, Inc.
26 *
27 * UFS byte swapping routines to make a big endian file system useful on a
28 * little endian machine.
29 *
30 * HISTORY
31 *
32 * 8 Jul 1992 Brian Pinkerton at NeXT
33 * Created.
34 */
35 #import <sys/disktab.h>
36 #import <sys/vnode.h>
37 #import <sys/buf.h>
38 #import <sys/disk.h>
39 #import <ufs/fs.h>
40 #import <ufs/inode.h>
41
42 #include <IOKit/storage/IONeXTPartitionScheme.h>
43
44 void byte_swap_ints(int *array, int count);
45 void byte_swap_shorts(short *array, int count);
46
47 void byte_swap_disklabel_in(disk_label_t *dl);
48 void byte_swap_disktab_in(struct disktab *dt);
49 void byte_swap_partition(struct partition *part);
50 void byte_swap_inode_in(struct icommon *dc, struct icommon *ic);
51 void byte_swap_dir_block_in(char *addr, int count);