Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/include
In directory usw-pr-cvs1:/tmp/cvs-serv15469
Modified Files:
attrib.h mft.h ntfs_rec.h
Log Message:
Renamed things, broke everything. Should be stabilized now in the headers.
Still reworking find attribute stuff but at least I have an idea of how I want
to do it now.
Index: attrib.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/attrib.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** attrib.h 2001/03/04 14:28:13 1.12
--- attrib.h 2001/03/05 02:45:35 1.13
***************
*** 54,58 ****
$FIRST_USER_DEFINED_ATTRIBUTE = cpu_to_le32( 0x1000),
$END = cpu_to_le32(0xffffffff),
! } ATTRIBUTE_TYPE;
/*
--- 54,58 ----
$FIRST_USER_DEFINED_ATTRIBUTE = cpu_to_le32( 0x1000),
$END = cpu_to_le32(0xffffffff),
! } ATTR_TYPES;
[...982 lines suppressed...]
--- 1880,1885 ----
* errno describes the error.
*/
! __s64 get_attribute_value(const ntfs_volume *vol, const ATTR_RECORD *a,
! __u8 *b);
/**
***************
*** 1916,1920 ****
* FIXME: Document possible errnos.
*/
! int set_attribute_value(ntfs_volume *vol, ATTRIBUTE_RECORD_HEADER *a,
const __u8 *b, __s64 l);
--- 1901,1905 ----
* FIXME: Document possible errnos.
*/
! int set_attribute_value(ntfs_volume *vol, ATTR_RECORD *a,
const __u8 *b, __s64 l);
Index: mft.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/mft.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** mft.h 2001/03/02 15:03:56 1.6
--- mft.h 2001/03/05 02:45:35 1.7
***************
*** 157,165 ****
check the link_count and if it is 1 we
delete the file. Otherwise we delete the
! FILENAME_ATTRIBUTE being referenced by the
directory entry from the mft record and
decrement the link_count.
FIXME: Careful with Win32 + DOS names! */
! /* 20*/ __u16 attributes_offset;/* Byte offset to the first attribute in this
mft record from the start of the mft record.
NOTE: Must be aligned to 8-byte boundary. */
--- 157,165 ----
check the link_count and if it is 1 we
delete the file. Otherwise we delete the
! FILENAME_ATTR being referenced by the
directory entry from the mft record and
decrement the link_count.
FIXME: Careful with Win32 + DOS names! */
! /* 20*/ __u16 attrs_offset; /* Byte offset to the first attribute in this
mft record from the start of the mft record.
NOTE: Must be aligned to 8-byte boundary. */
***************
*** 184,188 ****
potential extents, belonging to the non-base
mft record). */
! /* 40*/ __u16 next_attribute_instance; /* The instance number that will be
assigned to the next attribute added to this
mft record. NOTE: Incremented each time
--- 184,188 ----
potential extents, belonging to the non-base
mft record). */
! /* 40*/ __u16 next_attr_instance; /* The instance number that will be
assigned to the next attribute added to this
mft record. NOTE: Incremented each time
***************
*** 201,205 ****
* When reading we obviously use the data from the ntfs record header.
*/
! } __attribute__ ((__packed__)) MFT_RECORD_HEADER;
/**
--- 201,205 ----
* When reading we obviously use the data from the ntfs record header.
*/
! } __attribute__ ((__packed__)) MFT_RECORD;
/**
***************
*** 209,215 ****
* Takes the mft record @b and returns the number of bytes used in the record
* or 0 on error (i.e. b is not a valid mft record). Zero is not a valid size
! * for an mft record as it at least has to have the MFT_RECORD_HEADER thus
! * making the minumum size:
! * (sizeof(MFT_RECORD_HEADER) + 7) & ~7 + sizeof(ATTRIBUTE_TYPE) = 52 bytes
* Aside: The 8-byte alignment and the 4 bytes for the attribute type are needed
* as each mft record has to have a list of attributes even if it only contains
--- 209,215 ----
* Takes the mft record @b and returns the number of bytes used in the record
* or 0 on error (i.e. b is not a valid mft record). Zero is not a valid size
! * for an mft record as it at least has to have the MFT_RECORD, thus making the
! * minimum size:
! * (sizeof(MFT_RECORD) + 7) & ~7 + sizeof(ATTR_TYPES) = 52 bytes
* Aside: The 8-byte alignment and the 4 bytes for the attribute type are needed
* as each mft record has to have a list of attributes even if it only contains
***************
*** 219,223 ****
* wouldn't view this as corruption in itself though!).
*/
! inline __u32 get_mft_record_data_size(const MFT_RECORD_HEADER *b);
#endif /* defined MFT_H */
--- 219,223 ----
* wouldn't view this as corruption in itself though!).
*/
! inline __u32 get_mft_record_data_size(const MFT_RECORD *b);
#endif /* defined MFT_H */
Index: ntfs_rec.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/ntfs_rec.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ntfs_rec.h 2001/03/02 15:03:56 1.3
--- ntfs_rec.h 2001/03/05 02:45:35 1.4
***************
*** 36,40 ****
magic_HOLE = cpu_to_le32(0x454c4f48), /* "HOLE" == ??? (NTFS 3.0+?) */
magic_INDX = cpu_to_le32(0x58444e49), /* "INDX" == index buffer */
! } NTFS_RECORD_TYPE;
/*
--- 36,40 ----
magic_HOLE = cpu_to_le32(0x454c4f48), /* "HOLE" == ??? (NTFS 3.0+?) */
magic_INDX = cpu_to_le32(0x58444e49), /* "INDX" == index buffer */
! } NTFS_RECORD_TYPES;
/*
***************
*** 83,88 ****
*/
typedef struct {
! NTFS_RECORD_TYPE magic; /* A four-byte magic identifying the record
! type and/or status. */
__u16 usa_ofs; /* Offset to the Update Sequence Array (usa)
from the start of the ntfs record. */
--- 83,88 ----
*/
typedef struct {
! NTFS_RECORD_TYPES magic; /* A four-byte magic identifying the
! record type and/or status. */
__u16 usa_ofs; /* Offset to the Update Sequence Array (usa)
from the start of the ntfs record. */
***************
*** 91,95 ****
thus the number of fixups is the usa_count
minus 1. */
! } __attribute__ ((__packed__)) NTFS_RECORD_HEADER;
/**
--- 91,95 ----
thus the number of fixups is the usa_count
minus 1. */
! } __attribute__ ((__packed__)) NTFS_RECORD;
/**
***************
*** 101,106 ****
* any errors. Defined inline for additional speed.
*/
! extern __inline__ void __post_read_mst_fixup(NTFS_RECORD_HEADER *b,
! const __u32 size);
/**
--- 101,105 ----
* any errors. Defined inline for additional speed.
*/
! extern __inline__ void __post_read_mst_fixup(NTFS_RECORD *b, const __u32 size);
/**
***************
*** 118,122 ****
* be fixed up. Thus, we return success and not failure in this case.
*/
! int post_read_mst_fixup(NTFS_RECORD_HEADER *b, const __u32 size);
/**
--- 117,121 ----
* be fixed up. Thus, we return success and not failure in this case.
*/
! int post_read_mst_fixup(NTFS_RECORD *b, const __u32 size);
/**
***************
*** 139,143 ****
* at that position at that time).
*/
! int pre_write_mst_fixup(NTFS_RECORD_HEADER *b, const __u32 size);
#endif /* defined NTFS_REC_H */
--- 138,142 ----
* at that position at that time).
*/
! int pre_write_mst_fixup(NTFS_RECORD *b, const __u32 size);
#endif /* defined NTFS_REC_H */
|