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