Commit af657749 authored by Julien Muchembled's avatar Julien Muchembled

vm: O_TRUNC is meaningless when creating a file with O_EXCL

parent 3e4cd352
......@@ -199,7 +199,7 @@ class InstallDebianRecipe(BaseRecipe):
for dist, iso, kernel, initrd in self.dists:
vm = join(location, dist + '.img')
args = self.getQemuBasicArgs(dist, 256, unsafe=True)
open_flags = os.O_CREAT | os.O_EXCL | os.O_WRONLY | os.O_TRUNC
open_flags = os.O_CREAT | os.O_EXCL | os.O_WRONLY
fd = os.open(vm, open_flags, 0666)
try:
os.ftruncate(fd, self.size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment