~ubuntu-branches/ubuntu/maverick/ocfs2-tools/maverick

« back to all changes in this revision

Viewing changes to debugfs.ocfs2/utils.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabio M. Di Nitto
  • Date: 2007-11-19 06:53:59 UTC
  • Revision ID: james.westby@ubuntu.com-20071119065359-7yan1p3eg1d28sgx
Tags: 1.3.9-0ubuntu1

* Update default timeouts in template and translations files.

* debian/rules: fix clean target to not purge upstream patches/ directory.

* debian/control: rework Build-Depends
  - sort them: debian build specific bits first, upstream after in configure
    check order.
  - add pkg-config.
  - add libselinux1-dev and libsepol1-dev.

* add package ocfs2-tools-static-dev to include all development headers and
  static libraries required to build ocfs2-test (and possibly other tools
  that already in development stage.

* stop shipping local copy of mount.ocfs2.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        if (flag & OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC)
43
43
                g_string_append(str, "Sparse ");
44
44
 
 
45
        if (flag & OCFS2_FEATURE_INCOMPAT_TUNEFS_INPROG) {
 
46
                g_string_append(str, "AbortedTunefs ");
 
47
        }
 
48
 
45
49
        if (flag & ~(OCFS2_FEATURE_INCOMPAT_HEARTBEAT_DEV |
46
50
                     OCFS2_FEATURE_INCOMPAT_RESIZE_INPROG |
47
51
                     OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT |
48
 
                     OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC))
 
52
                     OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC |
 
53
                     OCFS2_FEATURE_INCOMPAT_TUNEFS_INPROG))
49
54
                g_string_append(str, "Unknown ");
50
55
 
51
56
        if (!str->len)
54
59
        return;
55
60
}
56
61
 
 
62
void get_tunefs_flag(uint32_t incompat_flag, uint16_t flag, GString *str)
 
63
{
 
64
        if (!(incompat_flag & OCFS2_FEATURE_INCOMPAT_TUNEFS_INPROG)) {
 
65
                g_string_append(str, "None");
 
66
                return;
 
67
        }
 
68
 
 
69
        if (flag & OCFS2_TUNEFS_INPROG_REMOVE_SLOT)
 
70
                g_string_append(str, "RemoveSlot ");
 
71
 
 
72
        if (flag & ~OCFS2_TUNEFS_INPROG_REMOVE_SLOT)
 
73
                g_string_append(str, "Unknown ");
 
74
 
 
75
        return;
 
76
}
 
77
 
57
78
void get_compat_flag(uint32_t flag, GString *str)
58
79
{
59
80
        if (flag & OCFS2_FEATURE_COMPAT_BACKUP_SB)
70
91
 
71
92
void get_rocompat_flag(uint32_t flag, GString *str)
72
93
{
73
 
        if (flag)
 
94
        if (flag & OCFS2_FEATURE_RO_COMPAT_UNWRITTEN)
 
95
                g_string_append(str, "Unwritten ");
 
96
 
 
97
        if (flag & ~OCFS2_FEATURE_RO_COMPAT_UNWRITTEN)
74
98
                 g_string_append(str, "Unknown ");
75
99
 
76
100
        if (!str->len)
422
446
                goto bail;
423
447
        }
424
448
 
425
 
        ret = ocfs2_extent_map_init(fs, ci);
426
 
        if (ret) {
427
 
                com_err(gbls.cmd, ret, "while initializing extent map");
428
 
                goto bail;
429
 
        }
430
 
 
431
449
        buflen = 1024 * 1024;
432
450
 
433
451
        ret = ocfs2_malloc_blocks(fs->fs_io,
496
514
                goto bail;
497
515
        }
498
516
 
499
 
        ret = ocfs2_extent_map_init(fs, ci);
500
 
        if (ret) {
501
 
                com_err(gbls.cmd, ret, "while initializing extent map");
502
 
                goto bail;
503
 
        }
504
 
 
505
517
        if (!*buflen) {
506
518
                *buflen = (((ci->ci_inode->i_size + fs->fs_blocksize - 1) >>
507
519
                            OCFS2_RAW_SB(fs->fs_super)->s_blocksize_bits) <<