aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mdev.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-02-04 23:35:27 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-02-04 23:35:27 +0100
commitba76b7a40b929878833731f76306b1c977cc8650 (patch)
tree76650a4982f567c3243472f6326b4daa56454c08 /util-linux/mdev.c
parent06af569f447664526a76e527ea14ae059f5c19a9 (diff)
downloadbusybox-ba76b7a40b929878833731f76306b1c977cc8650.tar.gz
mdev: chdir back to /dev after trying to read firmware
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r--util-linux/mdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 52122dd63..c592ef687 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -815,6 +815,7 @@ static void load_firmware(const char *firmware, const char *sysfs_path)
full_write(loading_fd, "-1", 2);
out:
+ xchdir("/dev");
if (ENABLE_FEATURE_CLEAN_UP) {
close(firmware_fd);
close(loading_fd);
@@ -921,7 +922,7 @@ int mdev_main(int argc UNUSED_PARAM, char **argv)
}
{
- int logfd = open("/dev/mdev.log", O_WRONLY | O_APPEND);
+ int logfd = open("mdev.log", O_WRONLY | O_APPEND);
if (logfd >= 0) {
xmove_fd(logfd, STDERR_FILENO);
G.verbose = 1;