[systemd-devel] [PATCHv4 3/3] resume-generator: add a generator for instantiating the resume unit.
Ivan Shapovalov
intelfx100 at gmail.com
Tue Aug 26 06:57:11 PDT 2014
On Tuesday 26 August 2014 at 09:18:30, Dave Reisner wrote:
> On Tue, Aug 26, 2014 at 04:11:05PM +0400, Ivan Shapovalov wrote:
> > resume-generator understands resume= kernel command line parameter and
> > instantiates the systemd-resume at .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.
> > ---
>
> ...
>
> > diff --git a/src/resume-generator/resume-generator.c b/src/resume-generator/resume-generator.c
> > new file mode 100644
> > index 0000000..38179ff
> > --- /dev/null
> > +++ b/src/resume-generator/resume-generator.c
> > @@ -0,0 +1,95 @@
>
> ...
>
> > +
> > +static int parse_proc_cmdline_item(const char *key, const char *value) {
> > + if (streq(key, "resume") && value) {
> > + free(arg_resume_dev);
> > + arg_resume_dev = strdup(value);
>
> Shouldn't this be fstab_node_to_udev_node() so that we can support
> things like resume=LABEL=myawesomedevice ?
>
> d
Yeah, indeed, makes sense. Didn't know there was a special function
for that. Done for v5.
--
Ivan Shapovalov / intelfx /
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140826/5cb4234e/attachment-0001.sig>
More information about the systemd-devel
mailing list