Basic Solution File System - BSFS
Loading...
Searching...
No Matches
fill.c File Reference

Implements the fill command for the BSFS browser. More...

Macros

#define FILL_DEFAULT_BLOCK   (64 * 1024)

Functions

int fill_cmd (FILE *disk, superblock_t *sb, char **args)
 Implements the fill command for the BSFS browser.

Variables

char current_path []
 Current browser prompt path (defined in browser_bsfs.c)

Detailed Description

Implements the fill command for the BSFS browser.

The fill command creates a number of files with a given size, measuring the elapsed time for the operation. Files are created sequentially using the high-level API and filled with a predictable byte pattern.

Usage: fill <count> <size> [prefix] [bs=<block>] [pattern=index|zero|random]

Parameters:

  • count : number of files to create (positive integer)
  • size : file size (supports K/M/G suffixes)
  • prefix : optional basename/path (default: "fill") used to build <prefix>_<NNN>.bin
  • bs= : optional block size for writes (default 64 KiB, supports suffixes)
  • pattern : optional fill pattern: "index" (default, byte = file id), "zero" (all zeros) or "random" (pseudo-random bytes)

Function Documentation

◆ fill_cmd()

int fill_cmd ( FILE * disk,
superblock_t * sb,
char ** args )

Implements the fill command for the BSFS browser.

The fill command creates a number of files with a given size, measuring the elapsed time for the operation. Files are created sequentially using the high-level API and filled with a predictable byte pattern.

Usage: fill <count> <size> [prefix] [bs=<block>] [pattern=index|zero|random]

Parameters:

  • count : number of files to create (positive integer)
  • size : file size (supports K/M/G suffixes)
  • prefix : optional basename/path (default: "fill") used to build <prefix>_<NNN>.bin
  • bs= : optional block size for writes (default 64 KiB, supports suffixes)
  • pattern : optional fill pattern: "index" (default, byte = file id), "zero" (all zeros) or "random" (pseudo-random bytes)

Variable Documentation

◆ current_path

char current_path[]
extern

Current browser prompt path (defined in browser_bsfs.c)

Current browser prompt path (defined in browser_bsfs.c)