diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-03-01 10:26:41 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-03-01 10:26:43 +0100 |
commit | 7e4d960993331e92567f0180e45322a93e6780ba (patch) | |
tree | 4d7444035303fc0b545e88afbd894176344fb2a3 /block/partitions/ldm.c | |
parent | de5bdff7a72acc281219be2b8edeeca1fd81c542 (diff) | |
parent | 164974a8f2a482f1abcb027c6d1a89dd79b14297 (diff) |
Merge branch 'linus' into sched/core
Merge reason: we'll queue up dependent patches.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'block/partitions/ldm.c')
-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 bd8ae788f689..e507cfbd044e 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; } |