From 6a761c72e203cbc58a4963df9c1c12a233cf5b0a Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Wed, 29 May 2013 13:44:42 +0300 Subject: db: make dev/null a character device with --initdb fixes #1714 --- src/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database.c b/src/database.c index e130f0b..1fe4eae 100644 --- a/src/database.c +++ b/src/database.c @@ -1227,7 +1227,7 @@ static int apk_db_create(struct apk_database *db) mkdirat(db->root_fd, "tmp", 01777); mkdirat(db->root_fd, "dev", 0755); - mknodat(db->root_fd, "dev/null", 0666, makedev(1, 3)); + mknodat(db->root_fd, "dev/null", S_IFCHR | 0666, makedev(1, 3)); mkdirat(db->root_fd, "etc", 0755); mkdirat(db->root_fd, "etc/apk", 0755); mkdirat(db->root_fd, "lib", 0755); -- cgit v1.2.3-70-g09d2