[systemd-devel] [RFC] [PATCHv2 3/3] resume-generator: add a generator for instantiating the resume unit.
Ivan Shapovalov
intelfx100 at gmail.com
Sun Aug 24 14:05:14 PDT 2014
On Sunday 24 August 2014 at 13:41:28, Thomas H.P. Andersen wrote:
> [...]
> > +static int process_resume(void) {
> > + _cleanup_free_ char *name = NULL, *lnk = NULL;
> > +
> > + name = unit_name_from_path_instance("systemd-resume", arg_resume_dev, ".service");
> > + if (!name)
> > + return log_oom();
> > +
> > + lnk = strjoin(arg_dest, "/" SPECIAL_SYSINIT_TARGET ".wants/", name, NULL);
> > + if (!lnk)
> > + return log_oom();
> > +
> > + mkdir_parents_label(lnk, 0755);
> > + if (symlink(SYSTEM_DATA_UNIT_PATH "/systemd-resume at .service", lnk) < 0) {
> > + log_error("Failed to create symlink %s: %m", lnk);
> > + return -errno;
> > + }
>
> return 0;
Thank you for spotting these mistakes. I'll send a v3.
--
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/20140825/18befed9/attachment.sig>
More information about the systemd-devel
mailing list