Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

File Systems & Mount Control

Mount and Unmount File Systems

mount

Supported functionality in SCML:

// Create a new mount
mount(
    source, target, filesystemtype,
    mountflags = 0,
    data
);

// Move the existing mount point
mount(
    source, target, filesystemtype,
    mountflags = MS_MOVE,
    data
);

// Create a bind mount
mount(
    source, target, filesystemtype,
    mountflags = MS_BIND | MS_REC | MS_MOVE,
    data
);

Silently-ignored mount flags:

  • MS_DIRSYNC
  • MS_LAZYTIME
  • MS_MANDLOCK
  • MS_NOATIME
  • MS_NODEV
  • MS_NODIRATIME
  • MS_NOEXEC
  • MS_NOSUID
  • MS_RDONLY
  • MS_RELATIME
  • MS_SILENT
  • MS_STRICTATIME
  • MS_SYNCHRONOUS

Partially supported mount flags:

  • MS_REC is only effective when used in conjunction with MS_BIND

Unsupported mount flags:

  • MS_REMOUNT
  • MS_SHARED
  • MS_PRIVATE
  • MS_SLAVE
  • MS_UNBINDABLE

For more information, see the man page.

umount and umount2

Supported functionality in SCML:

// Unmount a mounted file system
umount(target);

// Unmount a mounted file system with enhanced behavior control
umount2(target, flags = UMOUNT_NOFOLLOW);

Silently-ignored flags:

  • MNT_FORCE
  • MNT_DETACH
  • MNT_EXPIRE

For more information, see the man page.