summaryrefslogtreecommitdiffstats
path: root/commands/flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/flash.c')
-rw-r--r--commands/flash.c32
1 files changed, 8 insertions, 24 deletions
diff --git a/commands/flash.c b/commands/flash.c
index d881b4d399..5b7060aead 100644
--- a/commands/flash.c
+++ b/commands/flash.c
@@ -1,23 +1,7 @@
-/*
- * erase, protect, unprotect - FLASH support
- *
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * 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: © 2000 Wolfgang Denk <wd@denx.de>, DENX Software Engineering
+
+/* erase, protect, unprotect - FLASH support */
#include <common.h>
#include <command.h>
@@ -41,7 +25,7 @@ static int do_flerase(int argc, char *argv[])
filename = argv[1];
if (stat(filename, &s)) {
- printf("stat %s: %s\n", filename, errno_str());
+ printf("stat %s: %m\n", filename);
return 1;
}
@@ -49,7 +33,7 @@ static int do_flerase(int argc, char *argv[])
fd = open(filename, O_WRONLY);
if (fd < 0) {
- printf("open %s: %s\n", filename, errno_str());
+ printf("open %s: %m\n", filename);
return 1;
}
@@ -105,7 +89,7 @@ static int do_protect(int argc, char *argv[])
prot = 0;
if (stat(filename, &s)) {
- printf("stat %s: %s\n", filename, errno_str());
+ printf("stat %s: %m\n", filename);
return 1;
}
@@ -113,7 +97,7 @@ static int do_protect(int argc, char *argv[])
fd = open(filename, O_WRONLY);
if (fd < 0) {
- printf("open %s: %s\n", filename, errno_str());
+ printf("open %s: %m\n", filename);
return 1;
}