umsdos, kernel 2.4.9
PATCH 1/1 umsdos, kernel 2.4.9
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
fs/umsdos/emd.c +2 -2
@@ -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 );