From 7b68432c72455a7eb3364fb56f05e035e550a1d0 Mon Sep 17 00:00:00 2001 From: szaka Date: Sat, 12 Nov 2005 15:35:51 +0000 Subject: [PATCH] Name consistently the same $SDS, $SDH and $SII fields --- include/ntfs/layout.h | 11 +++-------- ntfsprogs/mkntfs.c | 8 ++++---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/include/ntfs/layout.h b/include/ntfs/layout.h index 4557d849..45b5890b 100644 --- a/include/ntfs/layout.h +++ b/include/ntfs/layout.h @@ -1911,20 +1911,15 @@ typedef struct { typedef struct { u32 hash; /* Hash of the security descriptor. */ u32 security_id; /* The security_id assigned to the descriptor. */ - u64 offset_in_sds; /* Offset of the descriptor in $SDS data stream. */ - u32 size_in_sds; /* Size of the descriptor in $SDS data stream. */ + u64 offset; /* Byte offset of this entry in the $SDS stream. */ + u32 length; /* Size in bytes of this entry in $SDS stream. */ u32 reserved_II; /* Padding - always unicode "II". */ } __attribute__((__packed__)) SDH_INDEX_DATA; /** * struct SII_INDEX_DATA - */ -typedef struct { - u32 hash; /* Hash of the security descriptor. */ - u32 security_id; /* The security_id assigned to the descriptor. */ - u64 offset_in_sds; /* Offset of the descriptor in $SDS data stream. */ - u32 size_in_sds; /* Size of the descriptor in $SDS data stream. */ -} __attribute__((__packed__)) SII_INDEX_DATA; +typedef SECURITY_DESCRIPTOR_HEADER SII_INDEX_DATA; /** * struct QUOTA_O_INDEX_DATA - diff --git a/ntfsprogs/mkntfs.c b/ntfsprogs/mkntfs.c index 0829fc8b..e89f03b9 100644 --- a/ntfsprogs/mkntfs.c +++ b/ntfsprogs/mkntfs.c @@ -2893,9 +2893,9 @@ static int initialize_secure(char *sds, u32 sds_size, MFT_RECORD *m) sdh_data->hash = sds_header->hash; sdh_data->security_id = sds_header->security_id; - sdh_data->offset_in_sds = sds_header->offset; + sdh_data->offset = sds_header->offset; - sdh_data->size_in_sds = sds_header->length; + sdh_data->length = sds_header->length; sdh_data->reserved_II = cpu_to_le32(0x00490049); /* SII index entry */ @@ -2911,8 +2911,8 @@ static int initialize_secure(char *sds, u32 sds_size, MFT_RECORD *m) idx_entry_sii->data_offset); sii_data->hash = sds_header->hash; sii_data->security_id = sds_header->security_id; - sii_data->offset_in_sds = sds_header->offset; - sii_data->size_in_sds = sds_header->length; + sii_data->offset = sds_header->offset; + sii_data->length = sds_header->length; if ((err = insert_index_entry_in_res_dir_index(idx_entry_sdh, sdh_size, m, NTFS_INDEX_SDH, 4, AT_UNUSED))) break;