diff options
author | Christoph Hellwig <hch@lst.de> | 2020-03-24 08:25:26 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-24 07:57:08 -0600 |
commit | 1442f76d4317b420580e11238d20789708c742a4 (patch) | |
tree | 86d763c8dd427a3a7b868906b77a36f888201832 /drivers/scsi/aacraid | |
parent | cbb5cb3b29f9eb158bd2db39cdc07db6d8087461 (diff) |
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>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index ee6bc2f9b80a..0443b74390cf 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -33,6 +33,7 @@ #include <linux/syscalls.h> #include <linux/delay.h> #include <linux/kthread.h> +#include <linux/msdos_partition.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> @@ -328,9 +329,9 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, buf = scsi_bios_ptable(bdev); if (!buf) return 0; - if(*(__le16 *)(buf + 0x40) == cpu_to_le16(0xaa55)) { - struct partition *first = (struct partition * )buf; - struct partition *entry = first; + if (*(__le16 *)(buf + 0x40) == cpu_to_le16(MSDOS_LABEL_MAGIC)) { + struct msdos_partition *first = (struct msdos_partition *)buf; + struct msdos_partition *entry = first; int saved_cylinders = param->cylinders; int num; unsigned char end_head, end_sec; |