ramips: fix USW-Flex reversed switch-port order
[openwrt/staging/mkresin.git] / tools / firmware-utils / src / mkdniimg.c
index 7230f09d4921c2b5b75a9a388499a69075a3c40f..8798b7babfdb0ba487452dfae6c88d786f38da40 100644 (file)
@@ -1,10 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  *  Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
- *
- *  This program is free software; you can redistribute it and/or modify it
- *  under the terms of the GNU General Public License version 2 as published
- *  by the Free Software Foundation.
- *
  */
 
 #include <stdio.h>
@@ -43,14 +39,13 @@ static char *board_id;
 #define ERRS(fmt, ...) do { \
        int save = errno; \
        fflush(0); \
-       fprintf(stderr, "[%s] *** error: " fmt "\n", \
+       fprintf(stderr, "[%s] *** error: " fmt ": %s\n", \
                        progname, ## __VA_ARGS__, strerror(save)); \
 } while (0)
 
 void usage(int status)
 {
        FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout;
-       struct board_info *board;
 
        fprintf(stream, "Usage: %s [OPTIONS...]\n", progname);
        fprintf(stream,
@@ -188,7 +183,6 @@ int main(int argc, char *argv[])
 
        res = EXIT_SUCCESS;
 
- out_flush:
        fflush(outfile);
 
  err_close_out: