Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63159
b: refs/heads/master
c: b84d879
h: refs/heads/master
i:
  63157: 1febff6
  63155: 1258c22
  63151: 2aa3688
v: v3
  • Loading branch information
Mark Fortescue authored and David S. Miller committed Jul 30, 2007
1 parent dcd9031 commit bf13a22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 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: cce933bc831c451f48ca26e5b0d9bfdfbfb327f8
refs/heads/master: b84d879639f83d35d3fcd909222522c928bf974b
5 changes: 4 additions & 1 deletion trunk/fs/partitions/msdos.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev,
Sector sect;
struct solaris_x86_vtoc *v;
int i;
short max_nparts;

v = (struct solaris_x86_vtoc *)read_dev_sector(bdev, offset+1, &sect);
if (!v)
Expand All @@ -218,7 +219,9 @@ parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev,
put_dev_sector(sect);
return;
}
for (i=0; i<SOLARIS_X86_NUMSLICE && state->next<state->limit; i++) {
/* Ensure we can handle previous case of VTOC with 8 entries gracefully */
max_nparts = le16_to_cpu (v->v_nparts) > 8 ? SOLARIS_X86_NUMSLICE : 8;
for (i=0; i<max_nparts && state->next<state->limit; i++) {
struct solaris_x86_slice *s = &v->v_slice[i];
if (s->s_size == 0)
continue;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/genhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static inline void set_capacity(struct gendisk *disk, sector_t size)

#ifdef CONFIG_SOLARIS_X86_PARTITION

#define SOLARIS_X86_NUMSLICE 8
#define SOLARIS_X86_NUMSLICE 16
#define SOLARIS_X86_VTOC_SANE (0x600DDEEEUL)

struct solaris_x86_slice {
Expand Down

0 comments on commit bf13a22

Please sign in to comment.