lkml.org 
[lkml]   [2001]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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

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/
\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.038 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site