From cd1ab665c8182b0f792aa66ef40cde241d4e1dee Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Mon, 17 Aug 1998 09:24:31 +0000 Subject: [PATCH] Don't use unaligned accesses when printing extended sense codes. --- sys/scsi/scsi_base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index b2ac70931fdf..67d01b86fdda 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -8,7 +8,7 @@ * file. * * Written by Julian Elischer (julian@dialix.oz.au) - * $Id: scsi_base.c,v 1.56 1998/04/17 22:37:08 des Exp $ + * $Id: scsi_base.c,v 1.57 1998/07/11 07:45:57 bde Exp $ */ #include "opt_bounce.h" @@ -875,7 +875,8 @@ void scsi_sense_print(xs) case 0x70: printf("%s", sense_key_text[key]); - info = ntohl(*((long *) ext->info)); + info = (ext->info[0] << 24) | (ext->info[1] << 16) + | (ext->info[2] << 8) | ext->info[3]; if (sense->error_code & SSD_ERRCODE_VALID) {