Changes by: antona
Update of /cvsroot/linux-ntfs/ntfs-driver-tng/scripts
In directory usw-pr-cvs1:/tmp/cvs-serv15531
Modified Files:
compat.c rl.c
Log Message:
enable merging and take out 3rd one for the mo
Index: compat.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfs-driver-tng/scripts/compat.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -U2 -r1.3 -r1.4
--- compat.c 10 Feb 2002 19:14:52 -0000 1.3
+++ compat.c 10 Feb 2002 19:21:44 -0000 1.4
@@ -245,5 +245,5 @@
{
int i;
- const char *lcn_str[5] = { "| |", "----", "!ENT", "EINV", "XXXX" };
+ const char *lcn_str[5] = { "HOLE", "NMAP", "!ENT", "EINV", "XXXX" };
if (!rl) {
Index: rl.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfs-driver-tng/scripts/rl.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -U2 -r1.1 -r1.2
--- rl.c 10 Feb 2002 18:43:43 -0000 1.1
+++ rl.c 10 Feb 2002 19:21:44 -0000 1.2
@@ -481,34 +481,4 @@
-/**
- * decompress_mapping_pairs - convert mapping pairs array to run list
- * @vol: ntfs volume on which the attribute resides
- * @attr: attribute record whose mapping pairs array to decompress
- * @run_list: optional run list in which to insert @attr's run list
- *
- * Decompress the attribute @attr's mapping pairs array into a run_list and
- * return the run list or -errno on error. If @run_list is not NULL then
- * the mapping pairs array of @attr is decompressed and the run list inserted
- * into the appropriate place in @run_list. If this is the case and the
- * function returns success, the original pointer passed into @run_list is no
- * longer valid.
- *
- * Check the return value for error with IS_ERR(ret_val). If this is FALSE,
- * the function was successful, the return value is the new run list, and if
- * an existing run list pointer was passed in, this is no longer valid.
- * If IS_ERR(ret_val) returns true, there was an error, the return value is not
- * a run_list pointer and the existing run list pointer if one was passed in
- * has not been touched. In this case use PTR_ERR(ret_val) to obtain the error
- * code. Following error codes are defined:
- * -ENOMEM Not enough memory to allocate run list array.
- * -EIO Corrupt run list.
- * -EINVAL Invalid parameters were passed in.
- * -ERANGE The two run lists overlap.
- *
- * FIXME: For now we take the conceptionally simplest approach of creating the
- * new run list disregarding the already existing one and then splicing the
- * two into one if that is possible (we check for overlap and discard the new
- * run list if overlap present and return error).
- */
run_list *decompress_mapping_pairs(const ntfs_volume *vol,
const ATTR_RECORD *attr, run_list *old_rl)
@@ -565,5 +535,5 @@
*/
if (((rlpos + 3) * sizeof(run_list)) > rlsize) {
- rl2 = ntfs_malloc_nofs(rlsize + PAGE_SIZE);
+ rl2 = ntfs_malloc_nofs(rlsize + (int)PAGE_SIZE);
if (unlikely(!rl2)) {
ntfs_free(rl);
@@ -969,7 +939,5 @@
#if 1
-/**
- * fragged
- */
+/* fragged */
#define MKRL(R,V,L,S) \
(R)->vcn = V; \
@@ -993,8 +961,4 @@
}
- memset (buf1, 0, 1024);
- memset (buf2, 0, 1024);
- memset (buf3, 0, 1024);
-
vol.sb = NULL;
vol.sector_size_bits = 9;
@@ -1013,15 +977,12 @@
if (IS_ERR (rl1))
return 1;
- //rl2 = decompress_mapping_pairs (&vol, (ATTR_RECORD*) buf2, NULL);
+ rl2 = decompress_mapping_pairs (&vol, (ATTR_RECORD*) buf2, rl1);
if (IS_ERR (rl2))
return 1;
- //rl3 = decompress_mapping_pairs (&vol, (ATTR_RECORD*) buf3, NULL);
- if (IS_ERR (rl3))
- return 1;
+ //rl3 = decompress_mapping_pairs (&vol, (ATTR_RECORD*) buf3, rl2);
+ //if (IS_ERR (rl3))
+ // return 1;
printf ("success\n");
-/*
-}
-*/
#endif
//printf ("%d,%d\n", ntfs_a, ntfs_f);
|