dtoverlay: A dry run needs no config directory

It's useful to be able to perform the dry run on any host, not just
a Raspberry Pi with runtime overlay support, and this works once the
validity check has been removed.
This commit is contained in:
Phil Elwell
2020-02-10 13:20:00 +00:00
committed by popcornmix
parent 3cd0547e38
commit 30ccc9a54d

View File

@@ -257,12 +257,12 @@ int main(int argc, const char **argv)
fatal_error("Failed to mount configfs - %d", errno);
}
dt_overlays_dir = sprintf_dup("%s/%s", cfg_dir, DT_OVERLAYS_SUBDIR);
if (!dir_exists(dt_overlays_dir))
fatal_error("configfs overlays folder not found - incompatible kernel");
if (!dry_run)
{
dt_overlays_dir = sprintf_dup("%s/%s", cfg_dir, DT_OVERLAYS_SUBDIR);
if (!dir_exists(dt_overlays_dir))
fatal_error("configfs overlays folder not found - incompatible kernel");
state = read_state(work_dir);
if (!state)
fatal_error("Failed to read state");