diff options
author | Olof Johansson <olof@lixom.net> | 2012-03-08 09:20:29 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-03-08 09:20:29 -0800 |
commit | acf346084bca289a00020a5c29c23673b801b380 (patch) | |
tree | 1ab7f6eeefd0564d8fb708b858dc19c8b7e0a67c /block | |
parent | c71656c018c8551eca45b2f873b239f0303d74cb (diff) | |
parent | 38bb3630bcba25f16106166a4aaf211c1d195863 (diff) |
Merge tag 'imx35-imx5-aips-setup' of git://git.pengutronix.de/git/imx/linux-2.6 into next/soc
i.MX35/5 AIPS setup
Includes sync up to 3.3-rc6
* tag 'imx35-imx5-aips-setup' of git://git.pengutronix.de/git/imx/linux-2.6:
ARM: mx35: Setup the AIPS registers
ARM: mx5: Use common function for configuring AIPS
Diffstat (limited to 'block')
-rw-r--r-- | block/partitions/ldm.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c index bd8ae788f68..e507cfbd044 100644 --- a/block/partitions/ldm.c +++ b/block/partitions/ldm.c @@ -2,7 +2,7 @@ * ldm - Support for Windows Logical Disk Manager (Dynamic Disks) * * Copyright (C) 2001,2002 Richard Russon <ldm@flatcap.org> - * Copyright (c) 2001-2007 Anton Altaparmakov + * Copyright (c) 2001-2012 Anton Altaparmakov * Copyright (C) 2001,2002 Jakob Kemi <jakob.kemi@telia.com> * * Documentation is available at http://www.linux-ntfs.org/doku.php?id=downloads @@ -1341,20 +1341,17 @@ found: ldm_error("REC value (%d) exceeds NUM value (%d)", rec, f->num); return false; } - if (f->map & (1 << rec)) { ldm_error ("Duplicate VBLK, part %d.", rec); f->map &= 0x7F; /* Mark the group as broken */ return false; } - f->map |= (1 << rec); - + if (!rec) + memcpy(f->data, data, VBLK_SIZE_HEAD); data += VBLK_SIZE_HEAD; size -= VBLK_SIZE_HEAD; - - memcpy (f->data+rec*(size-VBLK_SIZE_HEAD)+VBLK_SIZE_HEAD, data, size); - + memcpy(f->data + VBLK_SIZE_HEAD + rec * size, data, size); return true; } |