From patchwork Fri Apr 3 14:04:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2094 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775225169; bh=bQF02IT9SoNd/U0uQC+k5TizGC1GRReClz+WK3OjzZg=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=RQuRXPZZE+2FTG1Pcun01PG36klh0LNUDCftnSZFbnVAXzmp7k0TmsO0php46pfxk Ue0bPgo6fX95BP/XtSFG5KdgH/z/dOIE+9Wfixw92tWj0LVBKlKUfKV4/oO0qX4deI NG1Io/NS3yInYAtVk+vZZSrJp6mBwaGVe/XRf6X+uWmbZNY8Ht5aVN6T2jxKuIdo3+ tiOKpJYPByWoiaO9OQC8iiYqivbKDJqeMM6c+2Kdvvl3gcuquzhTbqzLZRDrp31ktL SAIdVRBai/+0XPXI+5xH/51e2nPkfs+QYtBA8yeoXkLYM1vMCkXV0MXKs8W9bMXNAn DpTQkJK/HsVeQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3AB966A369 for ; Fri, 3 Apr 2026 08:06:09 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id C5g2obCNk3Jq for ; Fri, 3 Apr 2026 08:06:09 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775225165; bh=bQF02IT9SoNd/U0uQC+k5TizGC1GRReClz+WK3OjzZg=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BuC0YxRzLNXUMO8ksOrJM+22XB2TR2iODzlvbWaqXgEcowXaixDjOHFNCl5dJPf9U uEnOoWoyd1Rq3y4+UtTJYblTwbXm5ErOH7jTUanNQvMj2ZpDA5McnMs26n0Os5Q28l e2trU8WwS3LiAGpFciDVf4+L+kv+mRAHHYLwbP5sxFNYxmVz1acGH8n1WCC05lht1+ i7twV+H3oC2H+DMruJJOhIrniBWE3Z0U2k/i1OrhYE1ES0bmHGAe9uAj4vnuDlSMvK 9oA5pR7H3NSwmPap8dP7OxZwmU5x9+YFlbhDQ+VcVdkrPf+2vakROghw2eGoEg0Z3u mbCzTiCT1uNUA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7249E6A351 for ; Fri, 3 Apr 2026 08:06:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775225163; bh=+AkuIzUPpilvKRgT6qBl/w/z5/lsOBpqHFKRURh4Gnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t+xENgP6MKgiMRFrboPtYl6sZW+hwuYcXGTRcQFAFiyjNZUzMW/hUW1yW+GHO+b86 v4lmsL4HP2efVnyxI+QfsO24k0kvx0pmdr6i1Hsbz7Kjzv9Juwra8qNH+slVwBhZvl iPGHRDL1OV6u98yLmZad7zsW/qvxHHL08x9FJ6IZICVkNwEPsw/Mui8GYfrAsah8/l 3YtjnRxTILoLyM9ZD6nJkpQ1vqkYwEtWxLExRITfjxeV8l80/FpNcfCgat6iX+g9tr Eo4/669KjpDopCy8AjTOovaS95HyplV2FLrJj1TB5jdfb4hjMgykUf3OthKHyHHa7a IWMprZFkCOe/A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 413336A358; Fri, 3 Apr 2026 08:06:03 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id xdJT-uEkcST4; Fri, 3 Apr 2026 08:06:03 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775225157; bh=TozoMReZCm4TZrlQiYDx1p4IbsJjNmtd3O6ZHIVcN28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PCnMSz0c4qSaith2qzpERm61yWfogi3bjayRBlCa6NTnAUTFugxQqzpw/lV3JDGXw 5cR3IqcgBDFznHNJRB4RMAw6Ea+k9fslnmo7lADG5tJ9tSjoDqE3frWC2uhZYwYQhZ o2r57wvRnzRF1CCooRTH9dyjbA3vQViYIR19rfKrDZexfqzAUfcchirvQppjGS8rFw nyu925yO4mTc7GMzo9VOvNc96D4jXeSWWruNpCZXOMdO5Rmm3wXkqdR/CSYHF+CO/8 HlEHf++7rBCoBaB05T/vHwqPbIUWRwJr2+QshJUIqDra5DHBuyojDhpDLD9+oTxcJB TTjTZHwjldwMg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id AD2E96A34F; Fri, 3 Apr 2026 08:05:57 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 3 Apr 2026 08:04:31 -0600 Message-ID: <20260403140523.1998228-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260403140523.1998228-1-sjg@u-boot.org> References: <20260403140523.1998228-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: KAMJ33ZN7BJ4X3OWXHX4MHNGOVK3MTCB X-Message-ID-Hash: KAMJ33ZN7BJ4X3OWXHX4MHNGOVK3MTCB X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 09/34] vfs: cmd: Move legacy filesystem commands to cmd/fs_legacy.c List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The legacy filesystem commands (ls, load, save, size, mkdir, rm, ln, mv, fstype, fstypes) use the interface/dev:part syntax to access filesystems directly. Move them to cmd/fs_legacy.c and add a new CONFIG_CMD_FS_LEGACY (default y) to control their compilation. This frees up cmd/fs.c for new VFS-based implementations that use absolute paths through the virtual filesystem layer. CONFIG_CMD_FS_GENERIC selects CONFIG_CMD_FS_LEGACY for backward compatibility. Signed-off-by: Simon Glass --- cmd/Kconfig | 14 +++++++++++++- cmd/Makefile | 2 +- cmd/{fs.c => fs_legacy.c} | 0 3 files changed, 14 insertions(+), 2 deletions(-) rename cmd/{fs.c => fs_legacy.c} (100%) diff --git a/cmd/Kconfig b/cmd/Kconfig index d56293ea1be..95ccb9fca1a 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2973,7 +2973,19 @@ config CMD_FS_GENERIC bool "filesystem commands" help Enables filesystem commands (e.g. load, ls) that work for multiple - fs types. + fs types. When VFS is available these use absolute paths through + the virtual filesystem. Otherwise the legacy interface/dev:part + commands are used. + +config CMD_FS_LEGACY + bool "Legacy filesystem commands (ls, load, save, ...)" + depends on CMD_FS_GENERIC && !VFS + default y + help + Enables the legacy filesystem commands that use the + interface/dev:part syntax to access filesystems directly. These + include load, save, ls, size, mkdir, rm, ln, mv, fstype and + fstypes. config CMD_FS_UUID bool "fsuuid command" diff --git a/cmd/Makefile b/cmd/Makefile index 82dcebf92c9..4d1b3eab90c 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -93,7 +93,7 @@ obj-$(CONFIG_CMD_FLASH) += flash.o obj-$(CONFIG_CMD_FPGA) += fpga.o obj-$(CONFIG_CMD_LUKS) += luks.o obj-$(CONFIG_CMD_FPGAD) += fpgad.o -obj-$(CONFIG_CMD_FS_GENERIC) += fs.o +obj-$(CONFIG_CMD_FS_LEGACY) += fs_legacy.o obj-$(CONFIG_CMD_FUSE) += fuse.o obj-$(CONFIG_CMD_FWU_METADATA) += fwu_mdata.o obj-$(CONFIG_CMD_GETTIME) += gettime.o diff --git a/cmd/fs.c b/cmd/fs_legacy.c similarity index 100% rename from cmd/fs.c rename to cmd/fs_legacy.c