public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: agk@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/device/dev-md.c
Date: Fri, 26 Jan 2007 17:15:00 -0000	[thread overview]
Message-ID: <20070126171517.11826.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2007-01-26 17:15:16

Modified files:
	.              : WHATS_NEW 
	lib/device     : dev-md.c 

Log message:
	Fix md signature check to handle both endiannesses.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.562&r2=1.563
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/device/dev-md.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4

--- LVM2/WHATS_NEW	2007/01/25 23:40:33	1.562
+++ LVM2/WHATS_NEW	2007/01/26 17:15:16	1.563
@@ -1,5 +1,6 @@
 Version 2.02.21 -
 ===================================
+  Fix md signature check to handle both endiannesses.
 
 Version 2.02.20 - 25th January 2007
 ===================================
--- LVM2/lib/device/dev-md.c	2004/11/27 22:07:41	1.3
+++ LVM2/lib/device/dev-md.c	2007/01/26 17:15:16	1.4
@@ -53,8 +53,10 @@
 	sb_offset = MD_NEW_SIZE_SECTORS(size) << SECTOR_SHIFT;
 
 	/* Check if it is an md component device. */
+	/* Version 1 is little endian; version 0.90.0 is machine endian */
 	if (dev_read(dev, sb_offset, sizeof(uint32_t), &md_magic) &&
-	    (md_magic == xlate32(MD_SB_MAGIC))) {
+	    ((md_magic == xlate32(MD_SB_MAGIC)) ||
+	     (md_magic == MD_SB_MAGIC))) {
 		if (sb)
 			*sb = sb_offset;
 		ret = 1;


             reply	other threads:[~2007-01-26 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-26 17:15 agk [this message]
2007-10-24  0:51 agk
2008-06-23 14:54 wysochanski
2008-06-23 19:26 wysochanski
2011-07-08 15:54 mbroz

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=20070126171517.11826.qmail@sourceware.org \
    --to=agk@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).