diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/ata-raid.c | 5 | ||||
-rw-r--r-- | sys/dev/ata/ata-raid.h | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c index c48d39c..98eb180 100644 --- a/sys/dev/ata/ata-raid.c +++ b/sys/dev/ata/ata-raid.c @@ -636,8 +636,9 @@ ar_rebuild(void *arg) rdp->lock_end = rdp->lock_start + size; splx(s); wakeup(rdp); - sprintf(rdp->pid->p_comm, "rebuilding ar%d %lld%%", - rdp->lun, 100*rdp->lock_start/(rdp->total_sectors/rdp->width)); + sprintf(rdp->pid->p_comm, "rebuilding ar%d %lld%%", rdp->lun, + (unsigned long long)(100 * rdp->lock_start / + (rdp->total_sectors / rdp->width))); } free(buffer, M_AR); for (disk = 0; disk < rdp->total_disks; disk++) { diff --git a/sys/dev/ata/ata-raid.h b/sys/dev/ata/ata-raid.h index 474ca97..f5cd69b 100644 --- a/sys/dev/ata/ata-raid.h +++ b/sys/dev/ata/ata-raid.h @@ -178,7 +178,7 @@ struct promise_raid_conf { u_int8_t disk_number; u_int8_t channel; u_int8_t device; - u_int64_t magic_0; + u_int64_t magic_0 __attribute__((packed)); u_int32_t disk_offset; /* 0x210 */ u_int32_t disk_sectors; u_int32_t rebuild_lba; @@ -207,13 +207,13 @@ struct promise_raid_conf { u_int16_t cylinders; u_int8_t heads; u_int8_t sectors; - int64_t magic_1; + int64_t magic_1 __attribute__((packed)); struct { /* 0x240 */ u_int8_t flags; u_int8_t dummy_0; u_int8_t channel; u_int8_t device; - u_int64_t magic_0; + u_int64_t magic_0 __attribute__((packed)); } disk[8]; } raid; int32_t filler2[346]; |