Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/ntfstools
In directory usw-pr-cvs1:/tmp/cvs-serv3795/ntfstools
Modified Files:
mkntfs.c
Log Message:
Index: mkntfs.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/ntfstools/mkntfs.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -U2 -r1.6 -r1.7
--- mkntfs.c 2001/06/03 12:04:30 1.6
+++ mkntfs.c 2001/06/04 11:29:45 1.7
@@ -1838,6 +1838,7 @@
/*
- * Create bitmap and index allocation attributes and modify index root
- * attribute accordingly.
+ * Create bitmap and index allocation attributes, modify index root
+ * attribute accordingly and move all of the index entries from the index root
+ * into the index allocation.
*
* Return 0 on success or -errno on error.
@@ -1853,5 +1854,5 @@
INDEX_ALLOCATION *a;
uchar_t *uname;
- char *bmp;
+ char bmp[8];
int i, err, r_size, index_block_size;
@@ -1880,7 +1881,16 @@
e = (INDEX_ENTRY*)((char*)&r->index + r->index.entries_offset);
index_block_size = le32_to_cpu(r->index_block_size);
- // add_attr_bitmap(m, );
- // add_attr_index_alloc(m, );
-
+ memset(bmp, 0, sizeof(bmp));
+ /* Bitmap has to be at least 8 bytes in size. */
+ err = add_attr_bitmap(m, uname, name_len, ic, upcase, upcase_len,
+ &bmp, sizeof(bmp));
+ if (err)
+ return err;
+ err = add_attr_index_alloc(m, uname, name_len, ic, upcase, upcase_len,
+ /*TODO: ...*/);
+ if (err) {
+ // TODO: Remove the added bitmap!
+ return err;
+ }
err = -ENOTSUP;
return err;
|