summaryrefslogtreecommitdiff
path: root/src/sw.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-07-24 01:24:16 +0200
committerRichard Braun <rbraun@sceen.net>2018-07-24 01:24:16 +0200
commit4ae79cffba89c9f619dc65414291db9ae71208a4 (patch)
treeea5de4cf9ea3dba211ca79ff9559212d1ebe6b24 /src/sw.c
parent2ba647b61c77c6b84a9bd2bcd611ebb2d61f64f1 (diff)
lib: update from upstreamHEADmaster
Diffstat (limited to 'src/sw.c')
-rw-r--r--src/sw.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/sw.c b/src/sw.c
index 4f74289..0cbb3bf 100644
--- a/src/sw.c
+++ b/src/sw.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 Richard Braun.
+ * Copyright (c) 2017-2018 Richard Braun.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -33,6 +33,7 @@
#include <lib/shell.h>
#include "condvar.h"
+#include "main.h"
#include "mutex.h"
#include "panic.h"
#include "sw.h"
@@ -198,8 +199,9 @@ out:
}
static void
-sw_shell_start(int argc, char **argv)
+sw_shell_start(struct shell *shell, int argc, char **argv)
{
+ (void)shell;
(void)argc;
(void)argv;
@@ -207,8 +209,9 @@ sw_shell_start(int argc, char **argv)
}
static void
-sw_shell_stop(int argc, char **argv)
+sw_shell_stop(struct shell *shell, int argc, char **argv)
{
+ (void)shell;
(void)argc;
(void)argv;
@@ -216,8 +219,9 @@ sw_shell_stop(int argc, char **argv)
}
static void
-sw_shell_resume(int argc, char **argv)
+sw_shell_resume(struct shell *shell, int argc, char **argv)
{
+ (void)shell;
(void)argc;
(void)argv;
@@ -225,8 +229,9 @@ sw_shell_resume(int argc, char **argv)
}
static void
-sw_shell_read(int argc, char **argv)
+sw_shell_read(struct shell *shell, int argc, char **argv)
{
+ (void)shell;
(void)argc;
(void)argv;
@@ -234,11 +239,13 @@ sw_shell_read(int argc, char **argv)
}
static void
-sw_shell_wait(int argc, char **argv)
+sw_shell_wait(struct shell *shell, int argc, char **argv)
{
unsigned long seconds;
int ret;
+ (void)shell;
+
if (argc != 2) {
goto error;
}
@@ -253,7 +260,7 @@ sw_shell_wait(int argc, char **argv)
return;
error:
- printf("sw_wait: error: invalid arguments\n");
+ shell_printf(shell, "sw_wait: error: invalid arguments\n");
}
static struct shell_cmd sw_shell_cmds[] = {
@@ -283,5 +290,5 @@ sw_setup(void)
panic("sw: error: unable to create stopwatch");
}
- SHELL_REGISTER_CMDS(sw_shell_cmds);
+ SHELL_REGISTER_CMDS(sw_shell_cmds, main_get_shell_cmd_set());
}