mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Russon <ntfs@flatcap.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.4.8 -- LDM build fix
Date: 12 Aug 2001 16:55:07 +0100	[thread overview]
Message-ID: <997631708.5538.8.camel@home.flatcap.org> (raw)

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



                 reply	other threads:[~2001-08-12 15:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=997631708.5538.8.camel@home.flatcap.org \
    --to=ntfs@flatcap.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®