drm-shim: fix EOF case

Close input end of the pipe after data was written. Without this
fix I have seen a hang in sysfs_uevent_get(.., "OF_FULLNAME")
when key was not found.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Christian Gmeiner 2019-11-12 12:46:20 +01:00
parent b12911c88e
commit e101af8671
1 changed files with 1 additions and 0 deletions

View File

@ -219,6 +219,7 @@ PUBLIC FILE *fopen(const char *path, const char *mode)
pipe(fds);
write(fds[1], file_overrides[i].contents,
strlen(file_overrides[i].contents));
close(fds[1]);
return fdopen(fds[0], "r");
}
}