~ubuntu-branches/ubuntu/edgy/e2fsprogs/edgy-security

« back to all changes in this revision

Viewing changes to lib/ext2fs/tst_types.c

  • Committer: Bazaar Package Importer
  • Author(s): Theodore Y. Ts'o
  • Date: 2006-05-29 11:07:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060529110753-uvkuaxqr96y31kqy
Tags: 1.39-1
* New upstream version
* Fix debugfs's dump_unused command so it will not core dump on
  filesystems with a 64k blocksize
* Clarified and improved man pages, including spelling errors
  (Closes: #368392, #368393, #368394, #368179)
* New filesystems are now created with directory indexing and
  on-line resizing enabled by default
* Fix previously mangled wording in an older Debian changelog entry
* Fix doc-base pointer to the top-level html file (Closes: #362544, #362970)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This testing program makes sure the ext2_types header file
 
3
 *
 
4
 * Copyright (C) 2006 by Theodore Ts'o.
 
5
 * 
 
6
 * %Begin-Header%
 
7
 * This file may be redistributed under the terms of the GNU Public
 
8
 * License.
 
9
 * %End-Header%
 
10
 */
 
11
 
 
12
#include "ext2fs/ext2_types.h"
 
13
 
 
14
main(int argc, char **argv)
 
15
{
 
16
        if (sizeof(__u8) != 1) {
 
17
                printf("Sizeof(__u8) is %d should be 1\n", 
 
18
                       sizeof(__u8));
 
19
                exit(1);
 
20
        }
 
21
        if (sizeof(__s8) != 1) {
 
22
                printf("Sizeof(_s8) is %d should be 1\n", 
 
23
                       sizeof(__s8));
 
24
                exit(1);
 
25
        }
 
26
        if (sizeof(__u16) != 2) {
 
27
                printf("Sizeof(__u16) is %d should be 2\n", 
 
28
                       sizeof(__u16));
 
29
                exit(1);
 
30
        }
 
31
        if (sizeof(__s16) != 2) {
 
32
                printf("Sizeof(__s16) is %d should be 2\n", 
 
33
                       sizeof(__s16));
 
34
                exit(1);
 
35
        }
 
36
        if (sizeof(__u32) != 4) {
 
37
                printf("Sizeof(__u32) is %d should be 4\n", 
 
38
                       sizeof(__u32));
 
39
                exit(1);
 
40
        }
 
41
        if (sizeof(__s32) != 4) {
 
42
                printf("Sizeof(__s32) is %d should be 4\n", 
 
43
                       sizeof(__s32));
 
44
                exit(1);
 
45
        }
 
46
        if (sizeof(__u64) != 8) {
 
47
                printf("Sizeof(__u64) is %d should be 8\n", 
 
48
                       sizeof(__u64));
 
49
                exit(1);
 
50
        }
 
51
        if (sizeof(__s64) != 8) {
 
52
                printf("Sizeof(__s64) is %d should be 8\n", 
 
53
                       sizeof(__s64));
 
54
                exit(1);
 
55
        }
 
56
        printf("The ext2_types.h types are correct.\n");
 
57
        exit(0);
 
58
}
 
59