From patchwork Thu Dec 12 00:47:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1208045 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="FNDlG0NQ"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YFYN6r4Xz9sR7 for ; Thu, 12 Dec 2019 11:49:12 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B1ECB814F9; Thu, 12 Dec 2019 01:48:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="FNDlG0NQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 06058814DA; Thu, 12 Dec 2019 01:48:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DDA6B81498 for ; Thu, 12 Dec 2019 01:48:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id a22so865201ios.3 for ; Wed, 11 Dec 2019 16:48:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JVUDDb2yMiY/mKE+nHBDVAZb/aceo+JRnrJWYAbVuCc=; b=FNDlG0NQ6odBTL+RuEPfzHx7IZuxu3kS0icIJxT5DvWXJdzK1VV7GUCCXK9v0VF3sP 06QfM3ZagLy8z3mRXmbcxQ3c4PFSIKQ0OGVBak+cJDcYvfi/ypt35x7yn2jAkouTkwiT jZLDmNUjB9/MKu3yX+AFMcIMRUWtcbzMe9/CI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JVUDDb2yMiY/mKE+nHBDVAZb/aceo+JRnrJWYAbVuCc=; b=C0Hf/4hm6VcBgkh7heMpS0evKaLq4rrZqzLn2k7QrnjhlYnFOWanub08jDw50HbXgU 0fQu8D2f0cyC1rdnM7Az448DeOXYs1WwOKmwk5p1yVzVvEcCgFzJUBS4E826zX+EMrt/ dApmrtGcgqCxOfI0lYhubWnZkAec6sSQdgx5fE3qfl/KpP5ybPZEroZ6irNCT3rf1yrE dmD/N196E5ZQdYhk6xtdYEtwp6h2BRSKBtVzc+Dqev4ahtV7vd+XNLP51QMvvdtz9Px/ MYG/PPVisMzu7QXMtBt4kPd7+q8jBWjfGRAP/nbSh64euVZfA2+vignycZpIS3eKDvy4 BVlg== X-Gm-Message-State: APjAAAWnAZ+Hk737FzLSxZAcR4LeSc/N6QnLLB009iTEX1oCBSuiC7/n NJN34naZzf9jGR+n81BJfZknNn94Vfo= X-Google-Smtp-Source: APXvYqzYCGKbDOohJtalooCTRm7NUL7+KPkL2s5cTo//W2rPO0htIg03peMJNIi+dqhHM7Qwv/6V/w== X-Received: by 2002:a5d:848c:: with SMTP id t12mr1045035iom.176.1576111694588; Wed, 11 Dec 2019 16:48:14 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id a11sm880194ioc.86.2019.12.11.16.48.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 16:48:14 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 07/35] common: Move functions for loading from fat/ext2 to fs.h Date: Wed, 11 Dec 2019 17:47:26 -0700 Message-Id: <20191211174637.7.I54725907dac44a8fc71676cf9ae42422470b30ec@changeid> X-Mailer: git-send-email 2.24.0.525.g8f36a354ae-goog In-Reply-To: <20191212004755.11091-2-sjg@chromium.org> References: <20191212004755.11091-2-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Andrej Rosano , Heinrich Schuchardt , Boris Brezillon , Joe Hershberger , Abhishek Shah Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean These are filesystem functions and belong in the filesystem header file. Move them. Signed-off-by: Simon Glass --- board/inversepath/usbarmory/usbarmory.c | 1 + cmd/fat.c | 2 +- cmd/pxe.c | 1 + include/common.h | 6 ------ include/fs.h | 22 ++++++++++++++++++++++ 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c index 19510184d8..e9eea40e45 100644 --- a/board/inversepath/usbarmory/usbarmory.c +++ b/board/inversepath/usbarmory/usbarmory.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/cmd/fat.c b/cmd/fat.c index 4b9a7eaab0..50df127f6d 100644 --- a/cmd/fat.c +++ b/cmd/fat.c @@ -31,7 +31,7 @@ U_BOOT_CMD( " and determine its size." ); -int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return do_load(cmdtp, flag, argc, argv, FS_TYPE_FAT); } diff --git a/cmd/pxe.c b/cmd/pxe.c index 194a366aa1..bce6728875 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "pxe_utils.h" diff --git a/include/common.h b/include/common.h index dbd7845a63..e5de74af33 100644 --- a/include/common.h +++ b/include/common.h @@ -81,12 +81,6 @@ extern ulong load_addr; /* Default Load Address */ extern ulong save_addr; /* Default Save Address */ extern ulong save_size; /* Default Save Size */ -/* common/cmd_fat.c */ -int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); - -/* common/cmd_ext2.c */ -int do_ext2load(cmd_tbl_t *, int, int, char * const []); - /* common/exports.c */ void jumptable_init(void); diff --git a/include/fs.h b/include/fs.h index 742a535b5f..37e35c2120 100644 --- a/include/fs.h +++ b/include/fs.h @@ -14,6 +14,28 @@ #define FS_TYPE_UBIFS 4 #define FS_TYPE_BTRFS 5 +/** + * do_fat_fsload - Run the fatload command + * + * @cmdtp: Command information for fatload + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + +/** + * do_ext2load - Run the ext2load command + * + * @cmdtp: Command information for ext2load + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + /* * Tell the fs layer which block device an partition to use for future * commands. This also internally identifies the filesystem that is present