mkefiboot: clarify construction of dm partition dev

This commit is contained in:
Will Woods 2011-08-30 13:10:13 -04:00
parent 3f709325ef
commit ad25ae85cb
1 changed files with 2 additions and 1 deletions

View File

@ -36,8 +36,9 @@ def mkefidisk(efiboot, outfile):
"unit", "b",
"mkpart", "'EFI System Partition'", "fat32", "17408", str(partsize),
"set", "1", "boot", "on"], stdout=PIPE, stderr=PIPE)
partdev = "/dev/mapper/{0}p1".format(dmdev)
with open(efiboot, "rb") as infile:
with open("/dev/mapper/%sp1" % dmdev, "wb") as outfile:
with open(partdev, "wb") as outfile:
outfile.write(infile.read())
dm_detach(dmdev+"p1")