From 5a25538485060e409764fb0b1fb5e3a8e914a7a2 Mon Sep 17 00:00:00 2001 From: dbj Date: Tue, 29 Nov 2005 08:47:22 +0000 Subject: [PATCH] fix byteswap of log revision structure check, improve error printout --- sbin/atactl/atactl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sbin/atactl/atactl.c b/sbin/atactl/atactl.c index da403743cb36..22fa6fd69117 100644 --- a/sbin/atactl/atactl.c +++ b/sbin/atactl/atactl.c @@ -1,4 +1,4 @@ -/* $NetBSD: atactl.c,v 1.40 2005/11/29 08:06:13 dbj Exp $ */ +/* $NetBSD: atactl.c,v 1.41 2005/11/29 08:47:22 dbj Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ #include #ifndef lint -__RCSID("$NetBSD: atactl.c,v 1.40 2005/11/29 08:06:13 dbj Exp $"); +__RCSID("$NetBSD: atactl.c,v 1.41 2005/11/29 08:47:22 dbj Exp $"); #endif @@ -641,7 +641,8 @@ print_error(void *buf) } if (erlog->data_structure_revision != 1) { - fprintf(stderr, "Log revision not 1\n"); + fprintf(stderr, "Error log revision not 1 (found 0x%04x)\n", + erlog->data_structure_revision); return; } @@ -709,8 +710,9 @@ print_selftest(void *buf) return; } - if (le16toh(stlog->data_structure_revision != 1)) { - fprintf(stderr, "Log revision not 1\n"); + if (le16toh(stlog->data_structure_revision) != 1) { + fprintf(stderr, "Self-test log revision not 1 (found 0x%04x)\n", + le16toh(stlog->data_structure_revision)); return; }