Files
u-boot/doc/usage/cmd/fsinfo.rst
Simon Glass a6b1cd23a7 cmd: Add fsinfo command
Add the fsinfo command to display filesystem statistics including block
size, total blocks, used blocks, and free blocks. Both raw byte counts
and human-readable sizes are shown.

Example output:
  => fsinfo mmc 0:1
  Block size: 4096 bytes
  Total blocks: 16384 (67108864 bytes, 64 MiB)
  Used blocks: 2065 (8458240 bytes, 8.1 MiB)
  Free blocks: 14319 (58650624 bytes, 55.9 MiB)

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:43 -07:00

54 lines
1.0 KiB
ReStructuredText

.. SPDX-License-Identifier: GPL-2.0+
.. index::
single: fsinfo (command)
fsinfo command
==============
Synopsis
--------
::
fsinfo <interface> <dev[:part]>
Description
-----------
The fsinfo command displays filesystem statistics for a partition including
block size, total blocks, used blocks, and free blocks. Both raw byte counts
and human-readable sizes are shown.
interface
interface for accessing the block device (mmc, sata, scsi, usb, ....)
dev
device number
part
partition number, defaults to 1
Example
-------
::
=> fsinfo mmc 0:1
Block size: 4096 bytes
Total blocks: 16384 (67108864 bytes, 64 MiB)
Used blocks: 2065 (8458240 bytes, 8.1 MiB)
Free blocks: 14319 (58650624 bytes, 55.9 MiB)
Configuration
-------------
The fsinfo command is only available if CONFIG_CMD_FS_GENERIC=y.
Return value
------------
The return value $? is set to 0 (true) if the command succeeded and to 1
(false) otherwise. If the filesystem does not support statfs, an error
message is displayed.