diff options
Diffstat (limited to 'tests/get_path.c')
-rw-r--r-- | tests/get_path.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/get_path.c b/tests/get_path.c index 7352976..7349898 100644 --- a/tests/get_path.c +++ b/tests/get_path.c @@ -1,21 +1,8 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later /* * libfdt - Flat Device Tree manipulation * Testcase for fdt_get_path() * 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> @@ -42,7 +29,8 @@ static void check_path_buf(void *fdt, const char *path, int pathlen, int buflen) memset(buf, POISON, sizeof(buf)); /* poison the buffer */ len = fdt_get_path(fdt, offset, buf, buflen); - verbose_printf("get_path() %s -> %d -> %s\n", path, offset, buf); + verbose_printf("get_path() %s -> %d -> %s\n", path, offset, + len >= 0 ? buf : "<error>"); if (buflen <= pathlen) { if (len != -FDT_ERR_NOSPACE) |