[PATCH] umsdos, kernel 2.4.9

From: Istvan Varadi (istvan.varadi@eth.ericsson.se)
Date: Tue Aug 21 2001 - 01:55:02 EST


Hello,

I noticed, that sometimes the EMD file (--linux-.---) does not contain
the full name of the files in the directores, which results in file
not found errors. It happens, e.g. when extracting the HTML version of
the PHP manual (http://www.php.net/manual/en/manual.tar.gz).

The problem occurs when a directory entry crosses a page boundary.
The contents of the second page are copied from the wrong starting
address. The patch below solves this problem.

Istvan

diff -ruN linux-2.4.9.orig/fs/umsdos/emd.c linux-2.4.9/fs/umsdos/emd.c
--- linux-2.4.9.orig/fs/umsdos/emd.c Sun Aug 19 10:31:51 2001
+++ linux-2.4.9/fs/umsdos/emd.c Sun Aug 19 10:43:15 2001
@@ -259,10 +259,10 @@
                 p->ctime = cpu_to_le32(entry->ctime);
                 p->rdev = cpu_to_le16(entry->rdev);
                 p->mode = cpu_to_le16(entry->mode);
- memcpy(p->name,entry->name,
+ memcpy(p->spare,entry->spare,
                         (char *)(page_address(page) + PAGE_CACHE_SIZE) - p->spare);
                 memcpy(page_address(page2),
- entry->spare+PAGE_CACHE_SIZE-offs,
+ ((char*)entry)+PAGE_CACHE_SIZE-offs,
                                 offs+info->recsize-PAGE_CACHE_SIZE);
                 ret = mapping->a_ops->commit_write(NULL,page2,0,
                                         offs+info->recsize-PAGE_CACHE_SIZE);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:40 EST