~csurbhi/ubuntu/maverick/e2fsprogs/e2fsprogs.fix-505719

« back to all changes in this revision

Viewing changes to e2fsck/jfs_user.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2008-08-08 20:32:11 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080808203211-w72lpsd9q7o3bw6x
Tags: 1.41.0-3ubuntu1
* Merge from Debian unstable (LP: #254152, #246461), remaining changes:
  - Do not build-depend on dietlibc-dev, which is in universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
typedef struct {
52
52
        int     object_length;
53
 
} kmem_cache_t;
 
53
} lkmem_cache_t;
54
54
 
55
55
#define kmem_cache_alloc(cache,flags) malloc((cache)->object_length)
56
56
#define kmem_cache_free(cache,obj) free(obj)
63
63
 
64
64
typedef unsigned int __be32;
65
65
 
 
66
#define __init
 
67
 
 
68
/*
 
69
 * Now pull in the real linux/jfs.h definitions.
 
70
 */
 
71
#include <ext2fs/kernel-jbd.h>
 
72
 
66
73
/*
67
74
 * We use the standard libext2fs portability tricks for inline
68
75
 * functions.  
69
76
 */
70
 
extern kmem_cache_t * do_cache_create(int len);
71
 
extern void do_cache_destroy(kmem_cache_t *cache);
 
77
extern lkmem_cache_t * do_cache_create(int len);
 
78
extern void do_cache_destroy(lkmem_cache_t *cache);
 
79
extern size_t journal_tag_bytes(journal_t *journal);
72
80
        
73
81
#if (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
74
82
#ifdef E2FSCK_INCLUDE_INLINE_FUNCS
81
89
#endif
82
90
#endif
83
91
 
84
 
_INLINE_ kmem_cache_t * do_cache_create(int len)
 
92
_INLINE_ lkmem_cache_t * do_cache_create(int len)
85
93
{
86
 
        kmem_cache_t *new_cache;
 
94
        lkmem_cache_t *new_cache;
87
95
        new_cache = malloc(sizeof(*new_cache));
88
96
        if (new_cache)
89
97
                new_cache->object_length = len;
90
98
        return new_cache;
91
99
}
92
100
 
93
 
_INLINE_ void do_cache_destroy(kmem_cache_t *cache)
 
101
_INLINE_ void do_cache_destroy(lkmem_cache_t *cache)
94
102
{
95
103
        free(cache);
96
104
}
 
105
 
 
106
/*
 
107
 * helper functions to deal with 32 or 64bit block numbers.
 
108
 */
 
109
_INLINE_ size_t journal_tag_bytes(journal_t *journal)
 
110
{
 
111
        if (JFS_HAS_INCOMPAT_FEATURE(journal, JFS_FEATURE_INCOMPAT_64BIT))
 
112
                return JBD_TAG_SIZE64;
 
113
        else
 
114
                return JBD_TAG_SIZE32;
 
115
}
 
116
 
97
117
#undef _INLINE_
98
118
#endif
99
119
 
100
 
#define __init
101
 
 
102
 
/*
103
 
 * Now pull in the real linux/jfs.h definitions.
104
 
 */
105
 
#include <ext2fs/kernel-jbd.h>
106
 
 
107
120
/*
108
121
 * Kernel compatibility functions are defined in journal.c
109
122
 */