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

Implements the pwd command for the BSFS filesystem. More...

Macros

#define PATH_MAX   4096

Functions

int pwd (FILE *disk, superblock_t *sb, char **args)
 Print the current working directory.

Variables

char current_path [PATH_MAX]
 Current working directory text (provided by the browser prompt)

Detailed Description

Implements the pwd command for the BSFS filesystem.

Displays the current working directory.

Macro Definition Documentation

◆ PATH_MAX

#define PATH_MAX   4096

Fallback maximum path length.

Function Documentation

◆ pwd()

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

Print the current working directory.

Usage: pwd

Parameters
diskOpen filesystem image.
sbLoaded superblock.
argsUnused.
Returns
1 to continue the REPL.

Variable Documentation

◆ current_path

char current_path[PATH_MAX]
extern

Current working directory text (provided by the browser prompt)

Current browser prompt path (defined in browser_bsfs.c)