mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] umsdos, kernel 2.4.9
@ 2001-08-21  6:55 Istvan Varadi
  0 siblings, 0 replies; only message in thread
From: Istvan Varadi @ 2001-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, mnalis-umsdos; +Cc: torvalds

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-21  6:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-21  6:55 [PATCH] umsdos, kernel 2.4.9 Istvan Varadi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®