Subject: sysutils/smartmontools on NetBSD/alpha (current)
To: None <port-alpha@netbsd.org>
From: Tobias Nygren <tnn+nbsd@nygren.pp.se>
List: port-alpha
Date: 09/22/2006 14:42:05
This doesn't look right ...

# smartctl -a /dev/wd0c
smartctl version 5.36 [alpha--netbsd] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     aMtxro6 3V000F
Serial Number:    6V30E0GE
Firmware Version: AV116103
User Capacity:    300,090,728,448 bytes
Device is:        Not in smartctl database [for details use: -P showall]


Looks like it needs byte swapping on the model string.
ataprint.c from smartmontools contains this code fragment:

#ifndef __NetBSD__
  swapbytes(tmp, in, n);
#else
  strncpy(tmp, in, n);  /* NetBSD delivers host byte order strings */
#endif

But alpha has the same endian as i386, so endian bugs are unlikely.
Where in the kernel is this host byte order conversion done?

martin@: cc'ing you since you seem to have done work in this
area in the past.

-Tobias