Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288027
b: refs/heads/master
c: 97387e3
h: refs/heads/master
i:
  288025: a790866
  288023: aba93c6
v: v3
  • Loading branch information
Anton Altaparmakov committed Feb 24, 2012
1 parent 3a4205e commit c552365
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b556248ecb059095e000f77c4b84899feb50098
refs/heads/master: 97387e3baaf3c35ad560f8878e943c720a77da1b
11 changes: 4 additions & 7 deletions trunk/block/partitions/ldm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1341,20 +1341,17 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags)
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;
}

Expand Down

0 comments on commit c552365

Please sign in to comment.