chiark / gitweb /
util: rework cunescape(), improve error handling
authorLennart Poettering <lennart@poettering.net>
Mon, 6 Apr 2015 18:11:41 +0000 (20:11 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:51:14 +0000 (07:51 +0100)
commit9db0dae86ec8bcab329b99b2f43f6e8e63d0ffa6
treefa79c561df7e3fa55159cf43f4d262d3923cfe10
parentef0698793cd19e82ce8e94e89f1c6461ec2f1dce
util: rework cunescape(), improve error handling

Change cunescape() to return a normal error code, so that we can
distuingish OOM errors from parse errors.

This also adds a flags parameter to control whether "relaxed" or normal
parsing shall be done. If set no parse failures are generated, and the
only reason why cunescape() can fail is OOM.
src/libelogind/sd-login/sd-login.c
src/login/logind-acl.c
src/login/logind-inhibit.c
src/shared/util.c
src/shared/util.h