aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r--util-linux/mdev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index f43393692..1df144fa9 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -39,10 +39,8 @@ static void make_device(char *path, int delete)
if (!delete) {
strcat(path, "/dev");
- fd = open(path, O_RDONLY);
- len = read(fd, temp + 1, 64);
+ len = open_read_close(path, temp + 1, 64);
*temp++ = 0;
- close(fd);
if (len < 1) return;
}