mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 13:33:09 +07:00
Follow-up to db840bd, use systemf() to simplify tmpfiles evn further
Also, added benefit, we don't get compiler warnings for ignoring the return value of system(), which we don't care about in this case. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+2
-4
@@ -516,10 +516,8 @@ static void tmpfiles(char *line)
|
||||
if (glob(path, GLOB_NOESCAPE, NULL, &gl))
|
||||
break;
|
||||
|
||||
for (size_t i = 0; i < gl.gl_pathc; i++) {
|
||||
snprintf(buf, sizeof(buf), "restorecon %s %s", opts, gl.gl_pathv[i]);
|
||||
system(buf);
|
||||
}
|
||||
for (size_t i = 0; i < gl.gl_pathc; i++)
|
||||
systemf("restorecon %s %s", opts, gl.gl_pathv[i]);
|
||||
break;
|
||||
default:
|
||||
errx(1, "Unsupported tmpfiles command '%s'", type);
|
||||
|
||||
Reference in New Issue
Block a user