Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/dkctl Until timeval.tv_sec becomes a time_t, we can't p...
details: https://anonhg.NetBSD.org/src/rev/e8f428eb355e
branches: trunk
changeset: 545789:e8f428eb355e
user: martin <martin%NetBSD.org@localhost>
date: Wed Apr 16 13:32:58 2003 +0000
description:
Until timeval.tv_sec becomes a time_t, we can't pass a pointer to
it to ctime(). tv_sec is long, while time_t is int on some archs.
diffstat:
sbin/dkctl/dkctl.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 150062db2f6a -r e8f428eb355e sbin/dkctl/dkctl.c
--- a/sbin/dkctl/dkctl.c Wed Apr 16 13:24:09 2003 +0000
+++ b/sbin/dkctl/dkctl.c Wed Apr 16 13:32:58 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dkctl.c,v 1.5 2003/04/16 08:39:56 dsl Exp $ */
+/* $NetBSD: dkctl.c,v 1.6 2003/04/16 13:32:58 martin Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -284,6 +284,7 @@
u_int32_t count;
struct stat sb;
u_char *block;
+ time_t tm;
if (argc != 1)
usage();
@@ -306,9 +307,10 @@
dbs = (struct disk_badsectors *)dbsi.dbsi_buffer;
for (count = dbsi.dbsi_copied; count > 0; count--) {
+ tm = dbs->dbs_failedat.tv_sec;
printf("%s: blocks %" PRIdaddr " - %" PRIdaddr " failed at %s",
dvname, dbs->dbs_min, dbs->dbs_max,
- ctime(&dbs->dbs_failedat.tv_sec));
+ ctime(&tm));
dbs++;
}
dbsi.dbsi_skip += dbsi.dbsi_copied;
Home |
Main Index |
Thread Index |
Old Index