~usb-creator-hackers/usb-creator/trunk

« back to all changes in this revision

Viewing changes to bin/usb-creator-helper

  • Committer: Martin Pitt
  • Date: 2014-08-18 10:51:11 UTC
  • Revision ID: martin.pitt@ubuntu.com-20140818105111-f2ob6x9smwms9ava
Revert "Ignore errors from synchronisations after wipefs calls". This
udisks hack doesn't work (it now silently fails to format the device,
instead of showing the error message), and won't stay in udisks.
(See LP #1059872)

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
            boot_dos_flag=64
243
243
            part.call_set_type_sync('0x0c', no_options, None)
244
244
            part.call_set_flags_sync(boot_dos_flag, no_options, None)
245
 
            block.call_format_sync('vfat', GLib.Variant('a{sv}', {'label': GLib.Variant('s', ''), "ignore-wipe-sync": GLib.Variant('b', True)}), None)
 
245
            block.call_format_sync('vfat', GLib.Variant('a{sv}', {'label': GLib.Variant('s', '')}), None)
246
246
        else:
247
247
            # Create a new partition table and a FAT partition.
248
248
            # Is this correct call to create partition table ?!
249
 
            block.call_format_sync('dos', GLib.Variant('a{sv}', {"ignore-wipe-sync": GLib.Variant('b', True)}), None)
 
249
            block.call_format_sync('dos', GLib.Variant('a{sv}', {}), None)
250
250
            block.call_rescan_sync(no_options)
251
251
            size = block.get_cached_property('Size').get_uint64()
252
252
            table = dev.get_partition_table()
253
253
            partition = table.call_create_partition_sync(0, size, '0x0c', '', no_options, None) 
254
254
            obj = udisks.get_object(partition)
255
255
            block = obj.get_block()
256
 
            block.call_format_sync('vfat', GLib.Variant('a{sv}', {'label': GLib.Variant('s', ''), "ignore-wipe-sync": GLib.Variant('b', True)}), None)
 
256
            block.call_format_sync('vfat', GLib.Variant('a{sv}', {'label': GLib.Variant('s', '')}), None)
257
257
 
258
258
        # Zero out the MBR.  Will require fancy privileges.
259
259
        parent_block = parent_dev.get_block()