Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/iostat select() -> nanosleep()
details: https://anonhg.NetBSD.org/src/rev/f54882b11f14
branches: trunk
changeset: 536579:f54882b11f14
user: mycroft <mycroft%NetBSD.org@localhost>
date: Wed Sep 18 23:18:44 2002 +0000
description:
select() -> nanosleep()
diffstat:
usr.sbin/iostat/iostat.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 7d09d5aee50a -r f54882b11f14 usr.sbin/iostat/iostat.c
--- a/usr.sbin/iostat/iostat.c Wed Sep 18 23:16:13 2002 +0000
+++ b/usr.sbin/iostat/iostat.c Wed Sep 18 23:18:44 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iostat.c,v 1.27 2002/06/30 00:10:35 sommerfeld Exp $ */
+/* $NetBSD: iostat.c,v 1.28 2002/09/18 23:18:44 mycroft Exp $ */
/*
* Copyright (c) 1996 John M. Vinopal
@@ -75,7 +75,7 @@
#if 0
static char sccsid[] = "@(#)iostat.c 8.3 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: iostat.c,v 1.27 2002/06/30 00:10:35 sommerfeld Exp $");
+__RCSID("$NetBSD: iostat.c,v 1.28 2002/09/18 23:18:44 mycroft Exp $");
#endif
#endif /* not lint */
@@ -124,7 +124,7 @@
main(int argc, char *argv[])
{
int ch, hdrcnt;
- struct timeval tv;
+ struct timespec tv;
while ((ch = getopt(argc, argv, "Cc:dDIM:N:Tw:x")) != -1)
switch(ch) {
@@ -182,7 +182,7 @@
selectdrives(argc, argv);
tv.tv_sec = interval;
- tv.tv_usec = 0;
+ tv.tv_nsec = 0;
/* print a new header on sigcont */
(void)signal(SIGCONT, header);
@@ -199,7 +199,7 @@
if (reps >= 0 && --reps <= 0)
break;
- select(0, NULL, NULL, NULL, &tv);
+ nanosleep(&tv, NULL);
dkreadstats();
}
exit(0);
Home |
Main Index |
Thread Index |
Old Index