Function sys_fs_pivot_root

Source
pub fn sys_fs_pivot_root(trapframe: &mut Trapframe) -> usize
Expand description

This system call mounts a filesystem at the specified target path.

§Arguments

  • trapframe.get_arg(0) - Pointer to source path (device/filesystem)
  • trapframe.get_arg(1) - Pointer to target mount point path
  • trapframe.get_arg(2) - Pointer to filesystem type string
  • trapframe.get_arg(3) - Mount flags
  • trapframe.get_arg(4) - Pointer to mount data/options

§Returns

  • 0 on success
  • usize::MAX on error (invalid path, filesystem not supported, etc.) Unmount a filesystem (FsUmount)

This system call unmounts a filesystem at the specified path.

§Arguments

  • trapframe.get_arg(0) - Pointer to target path to unmount
  • trapframe.get_arg(1) - Unmount flags (reserved for future use)

§Returns

  • 0 on success
  • usize::MAX on error (path not found, filesystem busy, etc.) Change root filesystem (FsPivotRoot)

This system call changes the root filesystem of the calling process.

§Arguments

  • trapframe.get_arg(0) - Pointer to new root path
  • trapframe.get_arg(1) - Pointer to old root mount point

§Returns

  • 0 on success
  • usize::MAX on error (invalid path, operation not permitted, etc.)