]> git.ipfire.org Git - thirdparty/systemd.git/commit - man/systemd.swap.xml
swap: use swapon -o
authorKarel Zak <kzak@redhat.com>
Mon, 25 May 2015 10:11:23 +0000 (12:11 +0200)
committerTom Gundersen <teg@jklm.no>
Mon, 25 May 2015 15:06:15 +0000 (17:06 +0200)
commitbf1d7ba70aceddb5dae0cd2e370b8afaf0c81b05
tree76ad4d459f83627376e4d21fd651d44637f6bf90
parent49f582c0a09100e7b282a32af2b2da66828ddcde
swap: use swapon -o

This patch simplify swapon usage in systemd. The command swapon(8)
since util-linux v2.26 supports "-o <list>". The idea is exactly the
same like for mount(8). The -o specifies options in fstab-compatible
way. For systemd it means that it does not have to care about things
like "discard" or another swapon specific options.

        swapon -o <options-from-fstab>

For backward compatibility the code cares about "Priority:" swap unit
field (for a case when Priority: is set, but pri= in the Options: is
missing).

References: http://lists.freedesktop.org/archives/systemd-devel/2014-October/023576.html
README
man/systemd.swap.xml
src/core/swap.c
src/fstab-generator/fstab-generator.c