Re: [systemd-devel] [RFC] [PATCHv2 3/3] resume-generator: add a generator for instantiating the resume unit.
On Sat, Aug 23, 2014 at 8:59 PM, Ivan Shapovalov intelfx...@gmail.com wrote: resume-generator understands resume= kernel command line parameter and instantiates the systemd-resume@.service accordingly if it is passed. This enables resume from hibernation using device specified on the kernel command line, where the device path may point to an arbitrary udev-created symlink, not only /dev/sdXY which is understood by the in-kernel implementation. --- Makefile-man.am | 2 + man/kernel-command-line.xml | 13 - man/systemd-resume-generator.xml| 91 src/resume-generator/Makefile | 1 + src/resume-generator/resume-generator.c | 93 + 5 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 man/systemd-resume-generator.xml create mode 12 src/resume-generator/Makefile create mode 100644 src/resume-generator/resume-generator.c diff --git a/Makefile-man.am b/Makefile-man.am index be19905..00daae2 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -76,6 +76,7 @@ MANPAGES += \ man/systemd-nspawn.1 \ man/systemd-path.1 \ man/systemd-remount-fs.service.8 \ + man/systemd-resume-generator.8 \ man/systemd-resume@.service.8 \ man/systemd-run.1 \ man/systemd-shutdownd.service.8 \ @@ -1632,6 +1633,7 @@ EXTRA_DIST += \ man/systemd-readahead-replay.service.xml \ man/systemd-remount-fs.service.xml \ man/systemd-resolved.service.xml \ + man/systemd-resume-generator.xml \ man/systemd-res...@.service.xml \ man/systemd-rfk...@.service.xml \ man/systemd-run.xml \ diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml index f244bfc..4bc6cee 100644 --- a/man/kernel-command-line.xml +++ b/man/kernel-command-line.xml @@ -351,6 +351,16 @@ /listitem /varlistentry +varlistentry +termvarnameresume=/varname/term + +listitem +paraEnables resume from hibernation +using the specified device. For +details, see + citerefentryrefentrytitlesystemd-resume-generator/refentrytitlemanvolnum8/manvolnum/citerefentry./para +/listitem +/varlistentry /variablelist /refsect1 @@ -373,7 +383,8 @@ citerefentryrefentrytitlesystemd-gpt-auto-generator/refentrytitlemanvolnum8/manvolnum/citerefentry, citerefentryrefentrytitlesystemd-modules-load.service/refentrytitlemanvolnum8/manvolnum/citerefentry, citerefentryrefentrytitlesystemd-backlight@.service/refentrytitlemanvolnum8/manvolnum/citerefentry, - citerefentryrefentrytitlesystemd-rfkill@.service/refentrytitlemanvolnum8/manvolnum/citerefentry + citerefentryrefentrytitlesystemd-rfkill@.service/refentrytitlemanvolnum8/manvolnum/citerefentry, + citerefentryrefentrytitlesystemd-resume-generator/refentrytitlemanvolnum8/manvolnum/citerefentry /para /refsect1 diff --git a/man/systemd-resume-generator.xml b/man/systemd-resume-generator.xml new file mode 100644 index 000..7962534 --- /dev/null +++ b/man/systemd-resume-generator.xml @@ -0,0 +1,91 @@ +?xml version=1.0? +!--*-nxml-*-- +!DOCTYPE refentry PUBLIC -//OASIS//DTD DocBook XML V4.2//EN http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd; +!-- + This file is part of systemd. + + Copyright 2014 Ivan Shapovalov + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see http://www.gnu.org/licenses/. +-- +refentry id=systemd-resume-generator + +refentryinfo +titlesystemd-resume-generator/title +productnamesystemd/productname + +authorgroup +author +contribDeveloper/contrib +firstnameIvan/firstname +
[systemd-devel] [RFC] [PATCHv2 3/3] resume-generator: add a generator for instantiating the resume unit.
resume-generator understands resume= kernel command line parameter and instantiates the systemd-resume@.service accordingly if it is passed. This enables resume from hibernation using device specified on the kernel command line, where the device path may point to an arbitrary udev-created symlink, not only /dev/sdXY which is understood by the in-kernel implementation. --- Makefile-man.am | 2 + man/kernel-command-line.xml | 13 - man/systemd-resume-generator.xml| 91 src/resume-generator/Makefile | 1 + src/resume-generator/resume-generator.c | 93 + 5 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 man/systemd-resume-generator.xml create mode 12 src/resume-generator/Makefile create mode 100644 src/resume-generator/resume-generator.c diff --git a/Makefile-man.am b/Makefile-man.am index be19905..00daae2 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -76,6 +76,7 @@ MANPAGES += \ man/systemd-nspawn.1 \ man/systemd-path.1 \ man/systemd-remount-fs.service.8 \ + man/systemd-resume-generator.8 \ man/systemd-resume@.service.8 \ man/systemd-run.1 \ man/systemd-shutdownd.service.8 \ @@ -1632,6 +1633,7 @@ EXTRA_DIST += \ man/systemd-readahead-replay.service.xml \ man/systemd-remount-fs.service.xml \ man/systemd-resolved.service.xml \ + man/systemd-resume-generator.xml \ man/systemd-res...@.service.xml \ man/systemd-rfk...@.service.xml \ man/systemd-run.xml \ diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml index f244bfc..4bc6cee 100644 --- a/man/kernel-command-line.xml +++ b/man/kernel-command-line.xml @@ -351,6 +351,16 @@ /listitem /varlistentry +varlistentry +termvarnameresume=/varname/term + +listitem +paraEnables resume from hibernation +using the specified device. For +details, see + citerefentryrefentrytitlesystemd-resume-generator/refentrytitlemanvolnum8/manvolnum/citerefentry./para +/listitem +/varlistentry /variablelist /refsect1 @@ -373,7 +383,8 @@ citerefentryrefentrytitlesystemd-gpt-auto-generator/refentrytitlemanvolnum8/manvolnum/citerefentry, citerefentryrefentrytitlesystemd-modules-load.service/refentrytitlemanvolnum8/manvolnum/citerefentry, citerefentryrefentrytitlesystemd-backlight@.service/refentrytitlemanvolnum8/manvolnum/citerefentry, - citerefentryrefentrytitlesystemd-rfkill@.service/refentrytitlemanvolnum8/manvolnum/citerefentry + citerefentryrefentrytitlesystemd-rfkill@.service/refentrytitlemanvolnum8/manvolnum/citerefentry, + citerefentryrefentrytitlesystemd-resume-generator/refentrytitlemanvolnum8/manvolnum/citerefentry /para /refsect1 diff --git a/man/systemd-resume-generator.xml b/man/systemd-resume-generator.xml new file mode 100644 index 000..7962534 --- /dev/null +++ b/man/systemd-resume-generator.xml @@ -0,0 +1,91 @@ +?xml version=1.0? +!--*-nxml-*-- +!DOCTYPE refentry PUBLIC -//OASIS//DTD DocBook XML V4.2//EN http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd; +!-- + This file is part of systemd. + + Copyright 2014 Ivan Shapovalov + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see http://www.gnu.org/licenses/. +-- +refentry id=systemd-resume-generator + +refentryinfo +titlesystemd-resume-generator/title +productnamesystemd/productname + +authorgroup +author +contribDeveloper/contrib +firstnameIvan/firstname +surnameShapovalov/surname +emailintelfx...@gmail.com/email +/author +/authorgroup +/refentryinfo + +