if (n < 0 || (size_t) n < l) {
log_error("Failed to write file %s: %s", path, n < 0 ? strerror(-n) : "Short write");
if (n < 0 || (size_t) n < l) {
log_error("Failed to write file %s: %s", path, n < 0 ? strerror(-n) : "Short write");
if (stat(path, &st) < 0) {
log_error("stat(%s) failed: %m", path);
if (stat(path, &st) < 0) {
log_error("stat(%s) failed: %m", path);
label_context_set(i->path, S_IFLNK);
r = symlink(i->argument, i->path);
label_context_set(i->path, S_IFLNK);
r = symlink(i->argument, i->path);
" --remove Remove marked files/directories\n"
" --boot Execute actions only safe at boot\n"
" --prefix=PATH Only apply rules that apply to paths with the specified prefix\n"
" --remove Remove marked files/directories\n"
" --boot Execute actions only safe at boot\n"
" --prefix=PATH Only apply rules that apply to paths with the specified prefix\n"
- " --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n",
+ " --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n"
+ " --root=PATH Operate on an alternate filesystem root\n",
{ "boot", no_argument, NULL, ARG_BOOT },
{ "prefix", required_argument, NULL, ARG_PREFIX },
{ "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX },
{ "boot", no_argument, NULL, ARG_BOOT },
{ "prefix", required_argument, NULL, ARG_PREFIX },
{ "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX },
- r = search_and_fopen_nulstr(fn, "re", conf_file_dirs, &f);
+ r = search_and_fopen_nulstr(fn, "re", arg_root, conf_file_dirs, &f);
- r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
+ r = conf_files_list_nulstr(&files, ".conf", arg_root, conf_file_dirs);