1 /* $NetBSD: find_property.c,v 1.1.1.3 2019/12/22 12:34:05 skrll Exp $ */
2
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 /*
5 * libfdt - Flat Device Tree manipulation
6 * Testcase for fdt_property_offset()
7 * Copyright (C) 2006 David Gibson, IBM Corporation.
8 */
9 #include <stdlib.h>
10 #include <stdio.h>
11 #include <string.h>
12 #include <stdint.h>
13
14 #include <libfdt.h>
15
16 #include "tests.h"
17 #include "testdata.h"
18
main(int argc,char * argv[])19 int main(int argc, char *argv[])
20 {
21 void *fdt;
22
23 test_init(argc, argv);
24 fdt = load_blob_arg(argc, argv);
25
26 check_property_cell(fdt, 0, "prop-int", TEST_VALUE_1);
27 check_property(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1, TEST_STRING_1);
28
29 PASS();
30 }
31