diff options
author | Michael Brown | 2013-11-01 03:22:12 +0100 |
---|---|---|
committer | Michael Brown | 2013-11-01 03:26:19 +0100 |
commit | 5e1fa5cd4090f229a40903f13abf328e86271717 (patch) | |
tree | 77a6302aeeb86f6c86fe95fb757a952a4ef7490e /src/image | |
parent | [ipv6] Add ndp_tx_router_solicitation() to send router solicitations (diff) | |
download | ipxe-5e1fa5cd4090f229a40903f13abf328e86271717.tar.gz ipxe-5e1fa5cd4090f229a40903f13abf328e86271717.tar.xz ipxe-5e1fa5cd4090f229a40903f13abf328e86271717.zip |
[parseopt] Add parse_timeout()
Parsing a timeout value (specified in milliseconds) into an internal
timeout value measured in timer ticks is a common operation. Provide
a parse_timeout() value to carry out this conversion automatically.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/script.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/image/script.c b/src/image/script.c index 881d51f3..8d80241d 100644 --- a/src/image/script.c +++ b/src/image/script.c @@ -361,7 +361,7 @@ struct prompt_options { /** Key to wait for */ unsigned int key; /** Timeout */ - unsigned int timeout; + unsigned long timeout; }; /** "prompt" option list */ @@ -369,7 +369,7 @@ static struct option_descriptor prompt_opts[] = { OPTION_DESC ( "key", 'k', required_argument, struct prompt_options, key, parse_key ), OPTION_DESC ( "timeout", 't', required_argument, - struct prompt_options, timeout, parse_integer ), + struct prompt_options, timeout, parse_timeout ), }; /** "prompt" command descriptor */ |