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)
edge.strict_endians
cantab.net!aia21 2004-03-15 10:54:47 +00:00
parent 161768d205
commit 481241602c
4 changed files with 6 additions and 7 deletions

View File

@ -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 */

View File

@ -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;
}

View File

@ -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) {

View File

@ -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;