X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tools%2Fubsha1.c;h=4a17246da78f1832876771000127c61183827232;hb=a89c3a04bcb416102eaa0b7c398209dbc1c796a2;hp=9774eea32e59ff94c21336e825dab88bdbe19a60;hpb=23b5b1d3e1e33e9650cc7a4e09901272a3811c64;p=oweals%2Fu-boot.git diff --git a/tools/ubsha1.c b/tools/ubsha1.c index 9774eea32e..4a17246da7 100644 --- a/tools/ubsha1.c +++ b/tools/ubsha1.c @@ -2,23 +2,7 @@ * (C) Copyright 2007 * Heiko Schocher, DENX Software Engineering, * - * 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+ */ #include "os_support.h" @@ -29,15 +13,7 @@ #include #include #include -#include "sha1.h" - -#ifndef __ASSEMBLY__ -#define __ASSEMBLY__ /* Dirty trick to get only #defines */ -#endif -#include -#undef __ASSEMBLY__ - -extern void sha1_csum (unsigned char *input, int ilen, unsigned char output[20]); +#include int main (int argc, char **argv) { @@ -87,10 +63,10 @@ int main (int argc, char **argv) sha1_csum ((unsigned char *) data, len, (unsigned char *)output); printf ("U-Boot sum:\n"); - for (i = 0; i < 20 ; i++) { - printf ("%02X ", output[i]); - } - printf ("\n"); + for (i = 0; i < 20 ; i++) { + printf ("%02X ", output[i]); + } + printf ("\n"); /* overwrite the sum in the bin file, with the actual */ lseek (ifd, SHA1_SUM_POS, SEEK_END); if (write (ifd, output, SHA1_SUM_LEN) != SHA1_SUM_LEN) {