busybox/e2fsprogs/old_e2fsprogs/ext2fs/ext2fsP.h
<<
>>
Prefs
   1/* vi: set sw=4 ts=4: */
   2/*
   3 * ext2fsP.h --- private header file for ext2 library
   4 *
   5 * Copyright (C) 1997 Theodore Ts'o.
   6 *
   7 * %Begin-Header%
   8 * This file may be redistributed under the terms of the GNU Public
   9 * License.
  10 * %End-Header%
  11 */
  12
  13#include "ext2fs.h"
  14
  15/*
  16 * Badblocks list
  17 */
  18struct ext2_struct_u32_list {
  19        int     magic;
  20        int     num;
  21        int     size;
  22        __u32   *list;
  23        int     badblocks_flags;
  24};
  25
  26struct ext2_struct_u32_iterate {
  27        int                     magic;
  28        ext2_u32_list           bb;
  29        int                     ptr;
  30};
  31
  32
  33/*
  34 * Directory block iterator definition
  35 */
  36struct ext2_struct_dblist {
  37        int                     magic;
  38        ext2_filsys             fs;
  39        ext2_ino_t              size;
  40        ext2_ino_t              count;
  41        int                     sorted;
  42        struct ext2_db_entry *  list;
  43};
  44
  45/*
  46 * For directory iterators
  47 */
  48struct dir_context {
  49        ext2_ino_t              dir;
  50        int             flags;
  51        char            *buf;
  52        int (*func)(ext2_ino_t  dir,
  53                    int entry,
  54                    struct ext2_dir_entry *dirent,
  55                    int offset,
  56                    int blocksize,
  57                    char        *buf,
  58                    void        *priv_data);
  59        void            *priv_data;
  60        errcode_t       errcode;
  61};
  62
  63/*
  64 * Inode cache structure
  65 */
  66struct ext2_inode_cache {
  67        void *                          buffer;
  68        blk_t                           buffer_blk;
  69        int                             cache_last;
  70        int                             cache_size;
  71        int                             refcount;
  72        struct ext2_inode_cache_ent     *cache;
  73};
  74
  75struct ext2_inode_cache_ent {
  76        ext2_ino_t              ino;
  77        struct ext2_inode       inode;
  78};
  79
  80/* Function prototypes */
  81
  82extern int ext2fs_process_dir_block(ext2_filsys         fs,
  83                                    blk_t               *blocknr,
  84                                    e2_blkcnt_t         blockcnt,
  85                                    blk_t               ref_block,
  86                                    int                 ref_offset,
  87                                    void                *priv_data);
  88