From 481241602cbda23a294fa04ab518ea29657f3484 Mon Sep 17 00:00:00 2001 From: "cantab.net!aia21" Date: Mon, 15 Mar 2004 10:54:47 +0000 Subject: [PATCH] Change ntfs_get_attribute_value syntax to not have the MFT_RECORD as it wasn't used anyway and the function is headed for death anyway... (Logical change 1.332) --- include/ntfs/attrib.h | 4 ++-- libntfs/attrib.c | 4 ++-- libntfs/inode.c | 2 +- libntfs/volume.c | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/ntfs/attrib.h b/include/ntfs/attrib.h index 402694ce..57fcbb69 100644 --- a/include/ntfs/attrib.h +++ b/include/ntfs/attrib.h @@ -306,8 +306,8 @@ s64 ntfs_get_attribute_value_length(const ATTR_RECORD *a); * then nothing was read due to a zero-length attribute value, otherwise * errno describes the error. */ -s64 ntfs_get_attribute_value(const ntfs_volume *vol, const MFT_RECORD *m, - const ATTR_RECORD *a, u8 *b); +s64 ntfs_get_attribute_value(const ntfs_volume *vol, const ATTR_RECORD *a, + u8 *b); #endif /* defined _NTFS_ATTRIB_H */ diff --git a/libntfs/attrib.c b/libntfs/attrib.c index 70a61ead..77b4c4a8 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -66,7 +66,7 @@ s64 ntfs_get_attribute_value_length(const ATTR_RECORD *a) /** * ntfs_get_attribute_value */ -s64 ntfs_get_attribute_value(const ntfs_volume *vol, const MFT_RECORD *m, +s64 ntfs_get_attribute_value(const ntfs_volume *vol, const ATTR_RECORD *a, u8 *b) { runlist *rl; @@ -74,7 +74,7 @@ s64 ntfs_get_attribute_value(const ntfs_volume *vol, const MFT_RECORD *m, int i; /* Sanity checks. */ - if (!vol || !m || !a || !b) { + if (!vol || !a || !b) { errno = EINVAL; return 0; } diff --git a/libntfs/inode.c b/libntfs/inode.c index 22755339..f6dfceb3 100644 --- a/libntfs/inode.c +++ b/libntfs/inode.c @@ -148,7 +148,7 @@ ntfs_inode *ntfs_inode_open(ntfs_volume *vol, const MFT_REF mref) ni->attr_list = malloc(ni->attr_list_size); if (!ni->attr_list) goto put_err_out; - l = ntfs_get_attribute_value(vol, ni->mrec, ctx->attr, ni->attr_list); + l = ntfs_get_attribute_value(vol, ctx->attr, ni->attr_list); if (!l) goto put_err_out; if (l != ni->attr_list_size) { diff --git a/libntfs/volume.c b/libntfs/volume.c index a6e675da..8b1bdffc 100644 --- a/libntfs/volume.c +++ b/libntfs/volume.c @@ -187,8 +187,7 @@ static int ntfs_mft_load(ntfs_volume *vol) Dputs("Error: failed to allocate buffer for attribute list."); goto error_exit; } - l = ntfs_get_attribute_value(vol, vol->mft_ni->mrec, ctx->attr, - vol->mft_ni->attr_list); + l = ntfs_get_attribute_value(vol, ctx->attr, vol->mft_ni->attr_list); if (!l) { Dputs("Error: failed to get value of $MFT/$ATTRIBUTE_LIST."); goto io_error_exit;