Commit 598b5f99 authored by dlukes's avatar dlukes
Browse files

-r ataioctl,2 will print the text represetation of data from now

It doesn't broke the posibility to replay recorded data even with older smartctl

(ticket #32)




git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@3013 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 36a3ac10
......@@ -43,6 +43,8 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[DL] -r ataioctl,2: print text representation of data also (ticket #32)
[DL] FreeBSD: freebsd_ata_device::ata_pass_through implemented (part of ticket #18)
[CF] drivedb.h updates:
......
......@@ -435,12 +435,19 @@ void print_regs(const char * prefix, const ata_out_regs & r, const char * suffix
static void prettyprint(const unsigned char *p, const char *name){
pout("\n===== [%s] DATA START (BASE-16) =====\n", name);
for (int i=0; i<512; i+=16, p+=16)
#define P(n) (isprint((int)(p[n]))?(int)(p[n]):'.')
// print complete line to avoid slow tty output and extra lines in syslog.
pout("%03d-%03d: %02x %02x %02x %02x %02x %02x %02x %02x "
"%02x %02x %02x %02x %02x %02x %02x %02x\n",
"%02x %02x %02x %02x %02x %02x %02x %02x"
" |%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c|"
"%c",
i, i+16-1,
p[ 0], p[ 1], p[ 2], p[ 3], p[ 4], p[ 5], p[ 6], p[ 7],
p[ 8], p[ 9], p[10], p[11], p[12], p[13], p[14], p[15]);
p[ 8], p[ 9], p[10], p[11], p[12], p[13], p[14], p[15],
P( 0), P( 1), P( 2), P( 3), P( 4), P( 5), P( 6), P( 7),
P( 8), P( 9), P(10), P(11), P(12), P(13), P(14), P(15),
'\n');
#undef P
pout("===== [%s] DATA END (512 Bytes) =====\n\n", name);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment