Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47570
b: refs/heads/master
c: 4419d1a
h: refs/heads/master
v: v3
  • Loading branch information
Olaf Hering authored and Linus Torvalds committed Feb 11, 2007
1 parent 35751e6 commit 3a94242
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 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: aa58d61d18b89b98521364550b481fd9bd18c3b6
refs/heads/master: 4419d1ac7def3c2f74cab15e4a1c69cffcaadedd
12 changes: 11 additions & 1 deletion trunk/fs/partitions/msdos.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,25 @@ msdos_magic_present(unsigned char *p)
#define AIX_LABEL_MAGIC4 0xC1
static int aix_magic_present(unsigned char *p, struct block_device *bdev)
{
struct partition *pt = (struct partition *) (p + 0x1be);
Sector sect;
unsigned char *d;
int ret = 0;
int slot, ret = 0;

if (p[0] != AIX_LABEL_MAGIC1 &&
p[1] != AIX_LABEL_MAGIC2 &&
p[2] != AIX_LABEL_MAGIC3 &&
p[3] != AIX_LABEL_MAGIC4)
return 0;
/* Assume the partition table is valid if Linux partitions exists */
for (slot = 1; slot <= 4; slot++, pt++) {
if (pt->sys_ind == LINUX_SWAP_PARTITION ||
pt->sys_ind == LINUX_RAID_PARTITION ||
pt->sys_ind == LINUX_DATA_PARTITION ||
pt->sys_ind == LINUX_LVM_PARTITION ||
is_extended_partition(pt))
return 0;
}
d = read_dev_sector(bdev, 7, &sect);
if (d) {
if (d[0] == '_' && d[1] == 'L' && d[2] == 'V' && d[3] == 'M')
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/genhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ enum {
WIN98_EXTENDED_PARTITION = 0x0f,

LINUX_SWAP_PARTITION = 0x82,
LINUX_DATA_PARTITION = 0x83,
LINUX_LVM_PARTITION = 0x8e,
LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */

SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
Expand Down

0 comments on commit 3a94242

Please sign in to comment.