parent
62d954e92c
commit
6646895a63
|
@ -27,6 +27,9 @@
|
|||
#include "types.h"
|
||||
#include "layout.h"
|
||||
|
||||
/**
|
||||
* struct options
|
||||
*/
|
||||
struct options {
|
||||
char *device; /* Device/File to work with */
|
||||
char *file; /* File to delete */
|
||||
|
@ -39,5 +42,66 @@ struct options {
|
|||
int nodirty; /* Do not mark volume dirty */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ntfs_bmp
|
||||
* a cache for either dir/$BITMAP, $MFT/$BITMAP or $Bitmap/$DATA
|
||||
*/
|
||||
struct ntfs_bmp {
|
||||
ntfs_attr *attr;
|
||||
u8 **data;
|
||||
VCN *data_vcn;
|
||||
int count;
|
||||
//int cluster_size;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ntfs_dt
|
||||
*/
|
||||
struct ntfs_dt {
|
||||
struct ntfs_dir *dir;
|
||||
struct ntfs_dt *parent;
|
||||
u8 *data;
|
||||
int data_len;
|
||||
int child_count;
|
||||
INDEX_ENTRY **children;
|
||||
struct ntfs_dt **sub_nodes;
|
||||
INDEX_HEADER *header;
|
||||
VCN vcn;
|
||||
BOOL changed;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ntfs_dir
|
||||
*/
|
||||
struct ntfs_dir {
|
||||
ntfs_volume *vol;
|
||||
struct ntfs_dir *parent;
|
||||
ntfschar *name;
|
||||
int name_len;
|
||||
struct ntfs_dt *index;
|
||||
struct ntfs_dir **children;
|
||||
int child_count;
|
||||
MFT_REF mft_num;
|
||||
struct mft_bitmap *bitmap;
|
||||
ntfs_inode *inode;
|
||||
ntfs_attr *iroot;
|
||||
ntfs_attr *ialloc;
|
||||
ntfs_attr *ibmp;
|
||||
int index_size;
|
||||
};
|
||||
|
||||
|
||||
#define RED "[31m"
|
||||
#define GREEN "[32m"
|
||||
#define YELLOW "[33m"
|
||||
#define BLUE "[34m"
|
||||
#define MAGENTA "[35m"
|
||||
#define CYAN "[36m"
|
||||
#define BOLD "[01m"
|
||||
#define END "[0m"
|
||||
|
||||
#define ROUND_UP(num,bound) (((num)+((bound)-1)) & ~((bound)-1))
|
||||
#define ATTR_SIZE(s) ROUND_UP(s,8)
|
||||
|
||||
#endif /* _NTFSRM_H_ */
|
||||
|
||||
|
|
Loading…
Reference in New Issue