block: move struct partition out of genhd.h
struct partition is the on-disk format of a MSDOS partition table entry. Move it out of genhd.h into a new msdos_partition.h header and give it a msdos_ prefix to avoid confusion. Also move the magic number from block/partitions/msdos.h to the new header so that it can be used by the SCSI drivers looking at the DOS partition tables. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
cbb5cb3b29
commit
1442f76d43
@@ -36,6 +36,7 @@
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/msdos_partition.h>
|
||||
#include <scsi/scsicam.h>
|
||||
|
||||
#include <asm/dma.h>
|
||||
@@ -3410,9 +3411,10 @@ static int blogic_diskparam(struct scsi_device *sdev, struct block_device *dev,
|
||||
a partition table entry whose end_head matches one of the
|
||||
standard BusLogic geometry translations (64/32, 128/32, or 255/63).
|
||||
*/
|
||||
if (*(unsigned short *) (buf + 64) == 0xAA55) {
|
||||
struct partition *part1_entry = (struct partition *) buf;
|
||||
struct partition *part_entry = part1_entry;
|
||||
if (*(unsigned short *) (buf + 64) == MSDOS_LABEL_MAGIC) {
|
||||
struct msdos_partition *part1_entry =
|
||||
(struct msdos_partition *)buf;
|
||||
struct msdos_partition *part_entry = part1_entry;
|
||||
int saved_cyl = diskparam->cylinders, part_no;
|
||||
unsigned char part_end_head = 0, part_end_sector = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user