extlinux: when building for klibc, mknod() needs to be a block device
authorH. Peter Anvin <hpa@zytor.com>
Fri, 25 Aug 2006 05:06:46 +0000 (22:06 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 25 Aug 2006 05:06:46 +0000 (22:06 -0700)
extlinux/extlinux.c

index 176ed2f..1ec8b7b 100644 (file)
@@ -675,7 +675,7 @@ install_loader(const char *path, int update_only)
     snprintf(devname_buf, sizeof devname_buf, "/tmp/dev-%u:%u",
             major(st.st_dev), minor(st.st_dev));
     
-    if (mknod(devname_buf, 0600, st.st_dev)) {
+    if (mknod(devname_buf, S_IFBLK|0600, st.st_dev)) {
       fprintf(stderr, "%s: cannot create device %s\n", program, devname);
       return 1;
     }