Function lrs::swap::swap_on

Adds a swap file/device.

Syntax

fn swap_on<P>(path: P, flags: SwapFlags, priority: Option<i16>) -> Result<(), Errno>
    where P: ToCString,

Arguments

NameDescription
path

A path to the file/device to be used as swap space.

flags

Flags to use to modify the swap behavior.

Only the SWAP_DISCARD flag should be used here. Use the third argument instead of specifying the SWAP_PREFER flag. }

priority