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:
@@ -219,6 +219,7 @@ PUBLIC FILE *fopen(const char *path, const char *mode)
|
|||||||
pipe(fds);
|
pipe(fds);
|
||||||
write(fds[1], file_overrides[i].contents,
|
write(fds[1], file_overrides[i].contents,
|
||||||
strlen(file_overrides[i].contents));
|
strlen(file_overrides[i].contents));
|
||||||
|
close(fds[1]);
|
||||||
return fdopen(fds[0], "r");
|
return fdopen(fds[0], "r");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user