1/*
2** Copyright 2004, Axel D��rfler, axeld@pinc-software.de. All rights reserved.
3** Distributed under the terms of the MIT License.
4*/
5
6
7#include <SupportDefs.h>
8
9#undef _PACKED
10#define _PACKED
11
12#include "bfs.h"
13
14#include <stdio.h>
15#include <stddef.h>
16
17
18#define SIZEOF(x) "%20s = %lu\n", #x, sizeof(x)
19#define OFFSETOF(x, y) #x "." #y " at offset %lu\n", offsetof(x, y)
20
21
22int
23main(int argc, char **argv)
24{
25	printf(SIZEOF(disk_super_block));
26	printf(SIZEOF(small_data));
27	printf(SIZEOF(data_stream));
28	printf(SIZEOF(bfs_inode));
29
30	puts("");
31
32	printf(OFFSETOF(bfs_inode, inode_size));
33	printf(OFFSETOF(bfs_inode, etc));
34	printf(OFFSETOF(bfs_inode, data));
35
36	return 0;
37}
38