diff options
author | Tobias Weingartner <weingart@cvs.openbsd.org> | 1997-04-28 07:39:02 +0000 |
---|---|---|
committer | Tobias Weingartner <weingart@cvs.openbsd.org> | 1997-04-28 07:39:02 +0000 |
commit | 4ef6cdf0befb6c0f6216955125f8fd6d6baea02b (patch) | |
tree | d0a9420019dcc83c39ce68afde0645bb60f89e55 /sys/stand/boot | |
parent | c941e38f34044523866fe64fcdcee65a8d1d2a77 (diff) |
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.
Diffstat (limited to 'sys/stand/boot')
-rw-r--r-- | sys/stand/boot/cmd.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/stand/boot/cmd.c b/sys/stand/boot/cmd.c index 7d196c09859..2dd7a222cdb 100644 --- a/sys/stand/boot/cmd.c +++ b/sys/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}, }; @@ -413,6 +415,18 @@ Xtty(cmd) } 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; { |