mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.4.8 -- LDM build fix
@ 2001-08-12 15:55 Richard Russon
  0 siblings, 0 replies; only message in thread
From: Richard Russon @ 2001-08-12 15:55 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: lkml

Hi Linus,

The LDM code (Windows Dynamic Disks) has been broken for a few
revisions now.  Please apply this patch to fix it.

Cheers,
  FlatCap (Rich)
  ntfs@flatcap.org

--

diff -urN linux-2.4.8/fs/partitions/ldm.c linux-2.4.8-ldm/fs/partitions/ldm.c
--- linux-2.4.8/fs/partitions/ldm.c	Sun Aug 12 16:45:00 2001
+++ linux-2.4.8-ldm/fs/partitions/ldm.c	Sun Aug 12 16:44:53 2001
@@ -141,7 +141,8 @@
 		printk(LDM_CRIT "Cannot find VBLK, database may be corrupt.\n");
 		return -1;
 	}
-	if (BE16(buffer + 0x0E) == 0)	/* Record is not in use. */
+	if ((BE16(buffer + 0x0E) == 0) ||       /* Record is not in use. */
+	    (BE16(buffer + 0x0C) != 0))         /* Part 2 of an ext. record */
 		return 0;
 
 	/* FIXME: What about extended VBLKs? */
diff -urN linux-2.4.8/fs/partitions/ldm.h linux-2.4.8-ldm/fs/partitions/ldm.h
--- linux-2.4.8/fs/partitions/ldm.h	Sun Aug 12 14:57:56 2001
+++ linux-2.4.8-ldm/fs/partitions/ldm.h	Sun Aug 12 16:18:27 2001
@@ -81,13 +81,13 @@
 #define TOC_BITMAP2		"log"		/* bitmaps in the TOCBLOCK. */
 
 /* Borrowed from msdos.c */
-#define SYS_IND(p)		(get_unaligned(&p->sys_ind))
-#define NR_SECTS(p)		({ __typeof__(p->nr_sects) __a =	\
-					get_unaligned(&p->nr_sects);	\
+#define SYS_IND(p)		(get_unaligned(&(p)->sys_ind))
+#define NR_SECTS(p)		({ __typeof__((p)->nr_sects) __a =	\
+					get_unaligned(&(p)->nr_sects);	\
 					le32_to_cpu(__a);		\
 				})
-#define START_SECT(p)		({ __typeof__(p->start_sect) __a =	\
-					get_unaligned(&p->start_sect);	\
+#define START_SECT(p)		({ __typeof__((p)->start_sect) __a =	\
+					get_unaligned(&(p)->start_sect);\
 					le32_to_cpu(__a);		\
 				})
 



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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-12 15:55 [PATCH] 2.4.8 -- LDM build fix 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®