drop-ins: check return value

If the function failed, nothing serious would happen
because unlink would probably return EFAULT, but this
would obscure the real error and is a bit sloppy.

Conflicts:
	src/core/unit.c
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2013-10-11 19:33:36 -04:00
parent 3288a531d6
commit b7a6e42e91
+3
View File
@@ -2940,6 +2940,9 @@ int unit_remove_drop_in(Unit *u, bool runtime, const char *name) {
assert(u);
r = drop_in_file(u, runtime, name, &p, &q);
if (r < 0)
return r;
if (unlink(q) < 0)
r = -errno;
else