mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] LDM bugfix - 2.4.13-ac5
@ 2001-11-01 14:14 Richard Russon
  0 siblings, 0 replies; only message in thread
From: Richard Russon @ 2001-11-01 14:14 UTC (permalink / raw)
  To: Alan Cox; +Cc: lkml

Hi Alan,

Please can you apply this patch to 2.4.13-ac5.
It fixes a minor mistake when reading the LDM database.

Cheers,
  FlatCap (Rich)
  ntfs@flatcap.org


diff -urN linux-2.4.13-ac5/fs/partitions/ldm.c linux-2.4.13-ac5-ldm/fs/partitions/ldm.c
--- linux-2.4.13-ac5/fs/partitions/ldm.c	Tue Oct 30 19:58:29 2001
+++ linux-2.4.13-ac5-ldm/fs/partitions/ldm.c	Thu Nov  1 04:34:53 2001
@@ -1,7 +1,7 @@
 /*
  * ldm - Part of the Linux-NTFS project.
  *
- * Copyright (C) 2001 Richard Russon <ntfs@flatcap.org>
+ * Copyright (C) 2001 Richard Russon <ldm@flatcap.org>
  * Copyright (C) 2001 Anton Altaparmakov <antona@users.sf.net> (AIA)
  *
  * Documentation is available at http://linux-ntfs.sf.net/ldm
@@ -453,7 +453,10 @@
 			delta = vblk * vsize + 0x18;
 			if (delta >= 512)
 				goto brelse_out;
-			if (block[0x13] != VBLK_DISK)
+			if (block[0x0D] != 0)	/* Extended VBLK, ignore */
+				continue;
+			if ((block[0x13] != VBLK_DSK1) &&
+			    (block[0x13] != VBLK_DSK2))
 				continue;
 			/* Calculate relative offsets. */
 			rel_objid = 1 + block[0x18];
diff -urN linux-2.4.13-ac5/fs/partitions/ldm.h linux-2.4.13-ac5-ldm/fs/partitions/ldm.h
--- linux-2.4.13-ac5/fs/partitions/ldm.h	Tue Oct 30 19:58:29 2001
+++ linux-2.4.13-ac5-ldm/fs/partitions/ldm.h	Thu Nov  1 05:39:01 2001
@@ -1,11 +1,9 @@
 #ifndef _FS_PT_LDM_H_
 #define _FS_PT_LDM_H_
 /*
- * $Id: ldm.h,v 1.13 2001/07/23 19:49:49 antona Exp $
- *
  * ldm - Part of the Linux-NTFS project.
  *
- * Copyright (C) 2001 Richard Russon <ntfs@flatcap.org>
+ * Copyright (C) 2001 Richard Russon <ldm@flatcap.org>
  * Copyright (C) 2001 Anton Altaparmakov <antona@users.sf.net>
  *
  * Documentation is available at http://linux-ntfs.sf.net/ldm
@@ -25,7 +23,7 @@
  * in the file COPYING); if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <asm/types.h>
+#include <linux/types.h>
 #include <asm/unaligned.h>
 #include <asm/byteorder.h>
 #include <linux/genhd.h>
@@ -45,8 +43,10 @@
 /* The defined vblk types. */
 #define VBLK_COMP		0x32		/* Component */
 #define VBLK_PART		0x33		/* Partition */
-#define VBLK_DISK		0x34		/* Disk */
-#define VBLK_DGRP		0x45		/* Disk Group */
+#define VBLK_DSK1		0x34		/* Disk */
+#define VBLK_DSK2		0x44		/* Disk */
+#define VBLK_DGR1		0x35		/* Disk Group */
+#define VBLK_DGR2		0x45		/* Disk Group */
 #define VBLK_VOLU		0x51		/* Volume */
 
 /* Other constants. */



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

only message in thread, other threads:[~2001-11-01 14:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-01 14:14 [PATCH] LDM bugfix - 2.4.13-ac5 Richard Russon

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®