From 221439164eb6683a5af35540b24b5620e5d8ab19 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 8 Apr 2018 22:12:08 -0500 Subject: Add mkpath() for common case of mkpathat(), and #define magic constants. --- toys/pending/mdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'toys/pending/mdev.c') diff --git a/toys/pending/mdev.c b/toys/pending/mdev.c index 9ee1f642..cab51e11 100644 --- a/toys/pending/mdev.c +++ b/toys/pending/mdev.c @@ -187,8 +187,7 @@ found_device: return; } - if (strchr(device_name, '/')) - mkpathat(AT_FDCWD, toybuf, 0, 2); + if (strchr(device_name, '/')) mkpath(toybuf); if (mknod(toybuf, mode | type, dev_makedev(major, minor)) && errno != EEXIST) perror_exit("mknod %s failed", toybuf); -- cgit v1.2.3