summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoru <u@451f.org>2015-07-06 17:14:31 +0200
committeru <u@451f.org>2015-07-06 17:14:31 +0200
commit315cd8d41dee5ae7acc135c5f350196d2fbda097 (patch)
treead9999741835f0c33b9e538a1468f90ec74a449e
parent5166fa1556d50b2dce0c8fbaaf64a8b194afbc4d (diff)
Imported Upstream version 4.1+dfsgupstream/4.1+dfsg
-rw-r--r--ChangeLog4
-rwxr-xr-xliveusb/creator.py11
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ae0ef0d..d20d766 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Date: Mon Apr 6 11:23:14 2015 +0100
+History is versioned in this Git repository:
+https://git-tails.immerda.ch/liveusb-creator
+
commit 0225dc48eb0e8f462b3082cd2aecb271decf7988
Author: Luke Macken <lmacken@redhat.com>
Date: Wed Jun 24 14:09:58 2009 -0400
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 0dbb4f6..6a3e071 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -1043,8 +1043,6 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
os.stat(tmp_syslinux).st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
self.flush_buffers()
self.unmount_device()
- # XXX: use call_open_for_restore_sync to avoid needing write
- # access to the raw block device
self.popen('%s %s -d %s %s' % (
tmp_syslinux,
' '.join(self.syslinux_options()),
@@ -1233,13 +1231,18 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
% {path: mbr_path}))
def reset_mbr(self):
- parent = self.drive.get('parent', self._drive)
+ parent = parent = self.drive.get('parent', self._drive)
if parent is None:
parent = self._drive
+ parent_udi = self.drive['udi']
+ else:
+ parent_udi = self.drive['parent_udi']
+ parent_udi = str(parent_udi)
parent = str(parent)
if '/dev/loop' not in self.drive:
self.log.info(_('Resetting Master Boot Record of %s') % parent)
- obj = self._get_object()
+ self.log.debug(_('Resetting Master Boot Record of %s') % parent_udi)
+ obj = self._get_object(udi=parent_udi)
block = obj.props.block
write_to_block_device(block, self.extracted_mbr_content)
else: