From 7ea8baeae3affc468da39ecaeef8829a445e29ef Mon Sep 17 00:00:00 2001 From: Will Woods Date: Tue, 1 Nov 2011 13:35:24 -0400 Subject: [PATCH] fix mkmacboot truncating the output file Use open(imgfile, 'r+b'), not 'wb'. Duh. --- src/sbin/mkefiboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbin/mkefiboot b/src/sbin/mkefiboot index c4c05e83..84b9c5e0 100755 --- a/src/sbin/mkefiboot +++ b/src/sbin/mkefiboot @@ -52,7 +52,7 @@ def macbless(imgfile): nodedata = struct.pack(">i", blessnode) dirdata = struct.pack(">i", dirnode) # Write it to the volume header - with open(imgfile, "wb") as img: + with open(imgfile, "r+b") as img: img.seek(0x450) # HFSPlusVolumeHeader->finderInfo img.write(dirdata) # finderInfo[0] img.write(nodedata) # finderInfo[1]