hotplug: improve error message during group ownership change
authorPetr Štetiar <ynezz@true.cz>
Fri, 24 May 2019 11:04:41 +0000 (13:04 +0200)
committerPetr Štetiar <ynezz@true.cz>
Thu, 30 May 2019 05:39:02 +0000 (07:39 +0200)
commit385b904b2f0a50030aaa33417a03f45babf4bd3d
tree200a146f42aef1ea711dbb305c6b0823a65b7c03
parent7f0f6b2a73f87c31cefc488316e387ed31838ed8
hotplug: improve error message during group ownership change

procd currently outputs following error messages:

 procd: cannot set group dialout for /dev/ttyw8
 procd: cannot set group dialout for /dev/ttyq1
 procd: cannot set group dialout for /dev/ttywf

from which it's not clear where the problem is, if it's either getgrnam
or chown failing and why it's failing so this patch adds name of failed
function and its errno.

Ref: https://github.com/openwrt/openwrt/pull/1773#issuecomment-495555284
Signed-off-by: Petr Štetiar <ynezz@true.cz>
plug/hotplug.c