Bug#158916: dpkg makes device nodes as regular files
Package: dpkg
Version: 1.9.21
We're using dpkg to build packages and flash images for an embedded system
we're developing. The call to mknod() in main/archives.c passes "0" as the
file mode, so device nodes come out as regular files. The patch below
seems to fix it:
--- main/archives.c.orig Tue Mar 12 00:36:45 2002
+++ main/archives.c Fri Aug 30 16:06:34 2002
@@ -526,7 +526,7 @@
newtarobject_allmodes(fnamenewvb.buf,ti, nifd->namenode->statoverride);
break;
case CharacterDevice: case BlockDevice:
- if (mknod(fnamenewvb.buf,0,ti->Device))
+ if (mknod(fnamenewvb.buf,ti->Mode,ti->Device))
ohshite(_("error creating device `%.255s'"),ti->Name);
debug(dbg_eachfiledetail,"tarobject CharacterDevice|BlockDevice");
newtarobject_allmodes(fnamenewvb.buf,ti, nifd->namenode->statoverride);
Thanks,
Mike
----------- --- -- - -
Michael Smith
Toaster Op, CBN Co. Ltd.
http://www.cbnco.com/
----------- --- -- - -
Reply to: