Module: OsCtld::Mount::Sys

Defined in:
lib/osctld/mount/sys.rb

Defined Under Namespace

Modules: Int

Class Method Summary collapse

Class Method Details

.move_mount(src, dst) ⇒ Object

Raises:

  • (SystemCallError)


20
21
22
23
24
# File 'lib/osctld/mount/sys.rb', line 20

def self.move_mount(src, dst)
  ret = Int.mount(src, dst, 0, Int::MS_MGC_VAL | Int::MS_MOVE, 0)
  raise SystemCallError, Fiddle.last_error if ret != 0
  ret
end

.unmount(mountpoint) ⇒ Object

Raises:

  • (SystemCallError)


26
27
28
29
30
# File 'lib/osctld/mount/sys.rb', line 26

def self.unmount(mountpoint)
  ret = Int.umount2(mountpoint, 0) # force unmount returns EACCESS
  raise SystemCallError, Fiddle.last_error if ret != 0
  ret
end