aboutsummaryrefslogtreecommitdiffstats
path: root/backend/magiback
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-12-14 19:18:42 +0100
committerPapoteur <papoteur@mageia.org>2018-12-15 15:58:21 +0100
commit81829df4a093f8f3648483f52ae8de683e0becfa (patch)
tree9f49792410c1b9e5a930dcd43fba6d1e3d36725e /backend/magiback
parent790b0c624000b023d18f32aaa3387de36e24a7ec (diff)
downloadisodumper-81829df4a093f8f3648483f52ae8de683e0becfa.tar
isodumper-81829df4a093f8f3648483f52ae8de683e0becfa.tar.gz
isodumper-81829df4a093f8f3648483f52ae8de683e0becfa.tar.bz2
isodumper-81829df4a093f8f3648483f52ae8de683e0becfa.tar.xz
isodumper-81829df4a093f8f3648483f52ae8de683e0becfa.zip
Allow writing the label of persistent partition, fixed to "mgalive-persist"
Diffstat (limited to 'backend/magiback')
-rwxr-xr-xbackend/magiback11
1 files changed, 7 insertions, 4 deletions
diff --git a/backend/magiback b/backend/magiback
index 01a730c..e1ec093 100755
--- a/backend/magiback
+++ b/backend/magiback
@@ -38,6 +38,7 @@ class Isodumper(raw_write.Dumper):
</method>
<method name='do_persistence'>
<arg type='s' name='target' direction='in'/>
+ <arg type='s' name='label' direction='in'/>
</method>
<method name='get_sum'>
<arg type='s' name='source' direction='in'/>
@@ -86,10 +87,10 @@ class Isodumper(raw_write.Dumper):
self.return_message = "Access denied"
self.finished.set()
- def do_persistence(self, target):
+ def do_persistence(self, target, label):
self.finished.clear()
if self.writing_perm and self.writing_target == target :
- self._do_persistence(target)
+ self._do_persistence(target, label)
else:
self.return_message = "Access denied"
self.writing_perm = False
@@ -123,10 +124,12 @@ class Isodumper(raw_write.Dumper):
return self._do_unmount([device])
def get_sum(self, source):
- key_thread = threading.Thread(target=self._get_sum, args=(source,))
- key_thread.start()
+ self.key_thread = threading.Thread(target=self._get_sum, args=(source,))
+ self.key_thread.start()
def check_write(self,target, source):
+ if hasattr(self, 'key_thread'):
+ self.key_thread.join()
self.thread = threading.Thread(target=self._check_write, args=(target, source,))
self.thread.start()