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

Implements chgrp command for BSFS. More...

Functions

int chgrp (FILE *disk, superblock_t *sb, char **args)
 Change file group (gid) of a path (root only).

Detailed Description

Implements chgrp command for BSFS.

Function Documentation

◆ chgrp()

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

Change file group (gid) of a path (root only).

Parses a decimal gid and updates the target's group 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 gid in args[1], path in args[2].
Returns
1 to continue the browser loop.