X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=disk%2Fpart_efi.c;h=9c33ae7a3174b37854ac5368628cf09e9e379bf0;hb=6152dd15283dbc3bb65ff02d6faad7ef9ef7f7bc;hp=fb5e9f0477a59d8bf6cc4a17c7db94d9e17363f2;hpb=fbbbc86e8ebac4f42f4ca39ceba80cea27c983bc;p=u-boot diff --git a/disk/part_efi.c b/disk/part_efi.c index fb5e9f0477..9c33ae7a31 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -2,23 +2,7 @@ * Copyright (C) 2008 RuggedCom, Inc. * Richard Retanubun * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ /* @@ -180,8 +164,9 @@ int get_partition_info_efi(block_dev_desc_t * dev_desc, int part, if (part > le32_to_cpu(gpt_head->num_partition_entries) || !is_pte_valid(&gpt_pte[part - 1])) { - printf("%s: *** ERROR: Invalid partition number %d ***\n", + debug("%s: *** ERROR: Invalid partition number %d ***\n", __func__, part); + free(gpt_pte); return -1; } @@ -200,8 +185,8 @@ int get_partition_info_efi(block_dev_desc_t * dev_desc, int part, uuid_string(gpt_pte[part - 1].unique_partition_guid.b, info->uuid); #endif - debug("%s: start 0x%lX, size 0x%lX, name %s", __func__, - info->start, info->size, info->name); + debug("%s: start 0x" LBAF ", size 0x" LBAF ", name %s", __func__, + info->start, info->size, info->name); /* Remember to free pte */ free(gpt_pte); @@ -431,7 +416,7 @@ int gpt_fill_pte(gpt_header *gpt_h, gpt_entry *gpt_e, gpt_e[i].partition_name[k] = (efi_char16_t)(partitions[i].name[k]); - debug("%s: name: %s offset[%d]: 0x%x size[%d]: 0x%lx\n", + debug("%s: name: %s offset[%d]: 0x%x size[%d]: 0x" LBAF "\n", __func__, partitions[i].name, i, offset, i, partitions[i].size); }