Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/ntfstools
In directory usw-pr-cvs1:/tmp/cvs-serv24664/ntfstools
Modified Files:
ntfslabel.c
Log Message:
Fix a buglet in the library and same in ntfslabel.c
Index: ntfslabel.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/ntfstools/ntfslabel.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -U2 -r1.4 -r1.5
--- ntfslabel.c 21 Apr 2002 09:55:18 -0000 1.4
+++ ntfslabel.c 21 Apr 2002 10:11:36 -0000 1.5
@@ -92,9 +92,11 @@
int check_mount(const char *file);
+int resize_resident_attribute_value(MFT_RECORD *m, ATTR_RECORD *a,
+ const __u32 new_vsize);
void change_label(const char *dev, const char *label)
{
- MFT_RECORD *mrec;
- MFT_REF *mref;
+ MFT_RECORD *mrec = NULL;
+ MFT_REF mref;
ATTR_RECORD *a;
ntfs_attr_search_ctx *ctx = NULL;
@@ -113,10 +115,10 @@
mref = (MFT_REF)FILE_Volume;
- if (err=ntfs_read_file_record(vol,mref,&mrec,NULL)){
+ if ((err = ntfs_read_file_record(vol,mref,&mrec,NULL))) {
printf("Error reading file record\n");
exit(1);
}
- ctx = ntfs_get_attr_search_ctx(NULL,mref);
+ ctx = ntfs_get_attr_search_ctx(NULL,mrec);
if (!ctx) {
@@ -136,5 +138,5 @@
}
- resize_resident_attribute_value(mref,a,strlen(label));
+ resize_resident_attribute_value(mrec, a, strlen(label));
|