aboutsummaryrefslogtreecommitdiff
path: root/tests/incbin.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/incbin.c')
-rw-r--r--tests/incbin.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/tests/incbin.c b/tests/incbin.c
index 4100ba0..36ff669 100644
--- a/tests/incbin.c
+++ b/tests/incbin.c
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
/*
* libfdt - Flat Device Tree manipulation
* Testcase for string escapes in dtc
* Copyright (C) 2006 David Gibson, IBM Corporation.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdlib.h>
#include <stdio.h>
@@ -65,8 +52,11 @@ int main(int argc, char *argv[])
test_init(argc, argv);
- incbin = load_file("incbin.bin", &len);
- fdt = load_blob_arg(argc, argv);
+ if (argc != 3)
+ CONFIG("Usage: %s <incbin file> <dtb file>", argv[0]);
+
+ incbin = load_file(argv[1], &len);
+ fdt = load_blob(argv[2]);
check_getprop(fdt, 0, "incbin", len, incbin);
check_getprop(fdt, 0, "incbin-partial", 17, incbin + 13);