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

Implements chown command for BSFS. More...

Functions

int chown (FILE *disk, superblock_t *sb, char **args)
 Change file owner (uid) of a path (root only).

Detailed Description

Implements chown command for BSFS.

Function Documentation

◆ chown()

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

Change file owner (uid) of a path (root only).

Parses a decimal uid and updates the target's owner via the API. Prints usage on invalid arguments and a concise error on failure.

Parameters
diskOpen filesystem image.
sbLoaded superblock.
argsCommand argv-like vector; expects uid in args[1], path in args[2].
Returns
1 to continue the browser loop.