- int r;
- _cleanup_fclose_ FILE *f;
-
- f = fopen(PKGSYSCONFDIR "/sleep.conf", "re");
- if (!f)
- log_full(errno == ENOENT ? LOG_DEBUG: LOG_WARNING,
- "Failed to open configuration file " PKGSYSCONFDIR "/sleep.conf: %m");
- else {
- r = config_parse(NULL, PKGSYSCONFDIR "/sleep.conf", f, "Sleep\0",
- config_item_table_lookup, items, false, false, NULL);
- if (r < 0)
- log_warning("Failed to parse configuration file: %s", strerror(-r));
- }
+ config_parse_many(PKGSYSCONFDIR "/sleep.conf",
+ CONF_DIRS_NULSTR("systemd/sleep.conf"),
+ "Sleep\0", config_item_table_lookup, items,
+ false, NULL);