summaryrefslogtreecommitdiffstats
path: root/commands/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/led.c')
-rw-r--r--commands/led.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/commands/led.c b/commands/led.c
index a53f0df6a2..7cf2ceefb8 100644
--- a/commands/led.c
+++ b/commands/led.c
@@ -1,22 +1,7 @@
-/*
- * LED command support for barebox
- *
- * (C) Copyright 2010 Sascha Hauer, Pengutronix
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: © 2010 Sascha Hauer, Pengutronix
+
+/* LED command support for barebox */
#include <common.h>
#include <led.h>
@@ -101,8 +86,8 @@ static int do_led(int argc, char *argv[])
ret = led_set(led, value);
if (ret < 0) {
- perror("led");
- return 1;
+ printf("led: %s\n", strerror(-ret));
+ return COMMAND_ERROR;
}
return 0;