From 4ef6cdf0befb6c0f6216955125f8fd6d6baea02b Mon Sep 17 00:00:00 2001 From: Tobias Weingartner Date: Mon, 28 Apr 1997 07:39:02 +0000 Subject: Add getsecs(). Use biostime & biosdate routines. Parse and convert to seconds since epoch. Please test, there is a new command "time", which should print the current time (according to the BIOS) on the console. --- sys/arch/i386/stand/boot/cmd.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386/stand/boot') diff --git a/sys/arch/i386/stand/boot/cmd.c b/sys/arch/i386/stand/boot/cmd.c index 7d196c09859..2dd7a222cdb 100644 --- a/sys/arch/i386/stand/boot/cmd.c +++ b/sys/arch/i386/stand/boot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.12 1997/04/26 17:50:07 mickey Exp $ */ +/* $OpenBSD: cmd.c,v 1.13 1997/04/28 07:39:00 weingart Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -63,6 +63,7 @@ static int Xregs __P((register struct cmd_state *)); static int Xset __P((register struct cmd_state *)); static int Xhowto __P((register struct cmd_state *)); static int Xtty __P((register struct cmd_state *)); +static int Xtime __P((register struct cmd_state *)); struct cmd_table { char *cmd_name; @@ -92,6 +93,7 @@ static const struct cmd_table cmd_table[] = { {"reboot", Xreboot}, {"regs", Xregs}, {"set", Xset, cmd_set}, + {"time", Xtime}, {NULL, 0}, }; @@ -412,6 +414,18 @@ Xtty(cmd) return 0; } +static int +Xtime(cmd) + register struct cmd_state *cmd; +{ + if (cmd->argc == 1) + time_print(); + else { + } + + return 0; +} + static int Xls(cmd) register struct cmd_state *cmd; -- cgit v1.2.3