platform/upstream/udisks2.git
10 years agoUpdate udisks.spec file. 88/12888/1
Jacek Pielaszkiewicz [Mon, 25 Nov 2013 10:00:47 +0000 (11:00 +0100)]
Update udisks.spec file.
The following changes have been implemented:
1. Update repository version to correct value -> 2.1.2
2. Remove unnecessary build dependency on polkit-backend-1 package

Change-Id: Id836b2008299671ef6cb9f8e80a3889b66033825
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
10 years agoqudisks2 - add packaging directory and spec file.
Jacek Pielaszkiewicz [Fri, 4 Oct 2013 12:14:10 +0000 (14:14 +0200)]
qudisks2 -  add packaging directory and spec file.

Change-Id: I50ba61c80dd576da11205dd3a63b62f420162961
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
10 years agoHide more rescue partitions upstream upstream/2.1.2
Bastien Nocera [Sun, 29 Sep 2013 09:56:31 +0000 (11:56 +0200)]
Hide more rescue partitions

Hide the Lenovo Recovery partition and the Windows 8 rescue partition.

https://bugs.freedesktop.org/show_bug.cgi?id=69921

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
10 years agoBug 67679 - build fails due to missing IT_PROG_INTLTOOL macro
David Zeuthen [Wed, 11 Sep 2013 20:04:46 +0000 (13:04 -0700)]
Bug 67679 - build fails due to missing IT_PROG_INTLTOOL macro

Patch from Seán de Búrca <leftmostcat@gmail.com>.

https://bugs.freedesktop.org/show_bug.cgi?id=67679

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
10 years agoPost-release version bump to 2.1.2
David Zeuthen [Wed, 21 Aug 2013 01:55:34 +0000 (18:55 -0700)]
Post-release version bump to 2.1.2

10 years agoUpdate NEWS for release
David Zeuthen [Wed, 21 Aug 2013 01:38:25 +0000 (18:38 -0700)]
Update NEWS for release

10 years agoIdentify Patriot Memory USB sticks as thumb drives
David Zeuthen [Wed, 21 Aug 2013 01:36:01 +0000 (18:36 -0700)]
Identify Patriot Memory USB sticks as thumb drives

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
10 years agoUse new SSD icon from g-i-t-e
David Zeuthen [Tue, 23 Jul 2013 07:11:35 +0000 (00:11 -0700)]
Use new SSD icon from g-i-t-e

See https://bugzilla.gnome.org/show_bug.cgi?id=701551

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agointegration-test: For VFAT, ignore case for label comparison
Martin Pitt [Wed, 22 May 2013 12:53:45 +0000 (14:53 +0200)]
integration-test: For VFAT, ignore case for label comparison

Avoids errors like

  AssertionError: 'TESTVFATTST' != 'testvfattst'

11 years agointegration-test: Fix for nonexisting /run/udev/rules.d/
Martin Pitt [Wed, 22 May 2013 13:13:05 +0000 (15:13 +0200)]
integration-test: Fix for nonexisting /run/udev/rules.d/

If that directory does not yet exist, but /run/udev/ does, create it.

11 years agoAdd ChromeOS partition types
David Zeuthen [Tue, 21 May 2013 16:31:11 +0000 (09:31 -0700)]
Add ChromeOS partition types

This is helpful when working with ChromeOS disk images.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksClient: Make it possible to get part desc based on the part table subtype
David Zeuthen [Tue, 21 May 2013 16:06:19 +0000 (09:06 -0700)]
UDisksClient: Make it possible to get part desc based on the part table subtype

Otherwise, Disks can't populate the partition table combobox correctly
for GPT because "Generic", "Apple" and "Other" subtypes all have the
same partition type (ZFS) but with different descriptions ("ZFS",
"Apple ZFS", "Solaris /usr").

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPromote ZFS partition type to generic
David Zeuthen [Tue, 21 May 2013 16:05:21 +0000 (09:05 -0700)]
Promote ZFS partition type to generic

In addition to Mac OS X and Solaris, It's also used in Linux.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoIdentify Transcend USB 3.0 Multi-Card reader as such
David Zeuthen [Sat, 18 May 2013 16:43:49 +0000 (09:43 -0700)]
Identify Transcend USB 3.0 Multi-Card reader as such

11 years agoIdentify Lexar Dual Slot USB 3.0 Reader Professional as a card reader
David Zeuthen [Thu, 16 May 2013 06:47:11 +0000 (23:47 -0700)]
Identify Lexar Dual Slot USB 3.0 Reader Professional as a card reader

Just got one of these.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix hiding of "WD SmartWare" partitions
Martin Pitt [Mon, 25 Mar 2013 13:58:18 +0000 (14:58 +0100)]
Fix hiding of "WD SmartWare" partitions

These might have a _ or a space as word separator.

https://launchpad.net/bugs/732365

11 years agoFix test for logind availability
Martin Pitt [Thu, 21 Mar 2013 06:23:59 +0000 (07:23 +0100)]
Fix test for logind availability

sd_booted() is not an appropriate check for whether we should talk to logind,
test for /run/systemd/seats/ instead.

For details, see:
<https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html>

11 years agoProperly identify firewire devices as non-system devices
David Zeuthen [Tue, 19 Mar 2013 04:31:40 +0000 (21:31 -0700)]
Properly identify firewire devices as non-system devices

This was reported in bug 62077.

https://bugs.freedesktop.org/show_bug.cgi?id=62077

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPost-release version bump to 2.1.1
David Zeuthen [Sun, 17 Mar 2013 22:41:37 +0000 (15:41 -0700)]
Post-release version bump to 2.1.1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate NEWS for release
David Zeuthen [Sun, 17 Mar 2013 22:29:58 +0000 (15:29 -0700)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoBump version to 2.1.0 and update date in man pages
David Zeuthen [Sun, 17 Mar 2013 22:27:20 +0000 (15:27 -0700)]
Bump version to 2.1.0 and update date in man pages

We're starting a new minor series.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate translations from Transifex
David Zeuthen [Sun, 17 Mar 2013 22:20:55 +0000 (15:20 -0700)]
Update translations from Transifex

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoCall the right D-Bus completion routines
David Zeuthen [Sun, 17 Mar 2013 22:14:12 +0000 (15:14 -0700)]
Call the right D-Bus completion routines

This was pointed out in https://bugs.freedesktop.org/show_bug.cgi?id=60079

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSupport broken setups where ID_SERIAL is available but ID_SERIAL_SHORT is not
David Zeuthen [Sun, 17 Mar 2013 22:10:21 +0000 (15:10 -0700)]
Support broken setups where ID_SERIAL is available but ID_SERIAL_SHORT is not

https://bugs.freedesktop.org/show_bug.cgi?id=59546

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoInitialize a local variable
Matthias Clasen [Thu, 31 Jan 2013 01:51:15 +0000 (20:51 -0500)]
Initialize a local variable

gcc 4.8 rightly complains that objects may be used uninitialized
here.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agomdraid: Remove spurious argument for the format (which takes none).
Alban Browaeys [Thu, 7 Mar 2013 16:27:20 +0000 (17:27 +0100)]
mdraid: Remove spurious argument for the format (which takes none).

Fixes gcc 4.8 build:
udisks/src/udiskslinuxmdraid.c:
In function 'handle_start':
udisks/src/udiskslinuxmdraid.c:693:46:
error: too many arguments for format [-Werror=format-extra-args]
                                              raid_device_file);

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agointegration-test: Update for mkntfs
Martin Pitt [Mon, 4 Mar 2013 13:35:02 +0000 (14:35 +0100)]
integration-test: Update for mkntfs

udisksd calls mkntfs now instead of mkfs.ntfs. Update integration-test
correspondingly.

11 years agoPost-release version bump to 2.0.93
David Zeuthen [Sun, 17 Feb 2013 23:08:28 +0000 (15:08 -0800)]
Post-release version bump to 2.0.93

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate NEWS for release
David Zeuthen [Sun, 17 Feb 2013 22:55:04 +0000 (14:55 -0800)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoIntroduce UDISKS_FILESYSTEM_SHARED=1 to use /media for mounting
David Zeuthen [Sun, 17 Feb 2013 22:49:21 +0000 (14:49 -0800)]
Introduce UDISKS_FILESYSTEM_SHARED=1 to use /media for mounting

A lot of haters been complaining about /run/media/$USER and there are
a couple of setups where it's awkward to use /etc/fstab entries and
just easier to write a short udev rule.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse own udev namespace for MD-RAID properties
David Zeuthen [Sun, 17 Feb 2013 22:19:51 +0000 (14:19 -0800)]
Use own udev namespace for MD-RAID properties

Bug 59759 - as well as the fact we're using both MD_ and MD_MEMBER -
points out a couple of problems with the MD-RAID user space bits. Move
into own namespace for now to avoid pollution from elsewhere.

https://bugs.freedesktop.org/show_bug.cgi?id=59759

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoCheck for NULL pointer when creating MD-RAID array
David Zeuthen [Sun, 17 Feb 2013 22:19:21 +0000 (14:19 -0800)]
Check for NULL pointer when creating MD-RAID array

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake sure logical partitions stay within the extended partition.
Marius Vollmer [Fri, 1 Feb 2013 09:27:38 +0000 (11:27 +0200)]
Make sure logical partitions stay within the extended partition.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't wipe extended partitions.
Marius Vollmer [Fri, 1 Feb 2013 08:38:40 +0000 (10:38 +0200)]
Don't wipe extended partitions.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agobuild: fix out of source build - set xsltproc path
Alban Browaeys [Sun, 20 Jan 2013 12:02:01 +0000 (13:02 +0100)]
build: fix out of source build - set xsltproc path

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't leak UDisksLinuxDevice when handling uevent
David Zeuthen [Tue, 8 Jan 2013 19:08:48 +0000 (14:08 -0500)]
Don't leak UDisksLinuxDevice when handling uevent

This is a pretty big leak as it involves the struct udev_device
instance for the event. FWIW, it's pretty easy to trigger this with
developer-setups with lots of uevents - on the upside, this mostly
only happens on developer setups so there's that.

This memory leak was reported in

 https://bugzilla.redhat.com/show_bug.cgi?id=892980

and it was reported as being "huge" and "insane" (!).

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRename UDisksCleanup to UDisksState
David Zeuthen [Mon, 7 Jan 2013 19:15:21 +0000 (14:15 -0500)]
Rename UDisksCleanup to UDisksState

It's more accurate and - hopefully - less confusing this way

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFold UDisksPersistentStore class into UDisksCleanup
David Zeuthen [Mon, 7 Jan 2013 18:45:27 +0000 (13:45 -0500)]
Fold UDisksPersistentStore class into UDisksCleanup

The latter is the only user so it's not useful to split it in two.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPost-release version bump to 2.0.92
David Zeuthen [Mon, 7 Jan 2013 16:30:54 +0000 (11:30 -0500)]
Post-release version bump to 2.0.92

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate NEWS for release
David Zeuthen [Mon, 7 Jan 2013 16:28:38 +0000 (11:28 -0500)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agobuild: fix passing arguments to configure from autogen.sh
Evan Nemerson [Wed, 2 Jan 2013 22:11:11 +0000 (14:11 -0800)]
build: fix passing arguments to configure from autogen.sh

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix up comments in polkit policy file
David Zeuthen [Mon, 7 Jan 2013 16:12:15 +0000 (11:12 -0500)]
Fix up comments in polkit policy file

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse correct polkit action
David Zeuthen [Mon, 7 Jan 2013 16:08:38 +0000 (11:08 -0500)]
Use correct polkit action

This was pointed out by Stefan Brüns in bug 58629.

https://bugs.freedesktop.org/show_bug.cgi?id=58629

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPull new translations from Transifex
David Zeuthen [Mon, 7 Jan 2013 15:20:47 +0000 (10:20 -0500)]
Pull new translations from Transifex

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoGet the MD-RAID sync rate from the right file
David Zeuthen [Fri, 21 Dec 2012 17:30:03 +0000 (12:30 -0500)]
Get the MD-RAID sync rate from the right file

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:SyncRate and MDRaid:SyncRemainingTime properties
David Zeuthen [Fri, 21 Dec 2012 17:25:23 +0000 (12:25 -0500)]
Add MDRaid:SyncRate and MDRaid:SyncRemainingTime properties

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:RequestSyncAction() method
David Zeuthen [Thu, 20 Dec 2012 17:23:55 +0000 (12:23 -0500)]
Add MDRaid:RequestSyncAction() method

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't bail in MD-RAID file monitor event handler
David Zeuthen [Wed, 19 Dec 2012 22:56:29 +0000 (17:56 -0500)]
Don't bail in MD-RAID file monitor event handler

The code was set up to bail the first time the event fired which
wasn't what we wanted (doh!). So we didn't pick up any events at all.

Also change severity of the logging message to debug from warning,
since read errors happen sporadically when a MD device is removed.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPost-release version bump to 2.0.91
David Zeuthen [Tue, 18 Dec 2012 20:56:13 +0000 (15:56 -0500)]
Post-release version bump to 2.0.91

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate NEWS for release
David Zeuthen [Tue, 18 Dec 2012 20:54:31 +0000 (15:54 -0500)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd new translations from Transifix
David Zeuthen [Tue, 18 Dec 2012 20:40:14 +0000 (15:40 -0500)]
Add new translations from Transifix

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPull latest translations from Transifex
David Zeuthen [Tue, 18 Dec 2012 20:38:53 +0000 (15:38 -0500)]
Pull latest translations from Transifex

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRemove MDRaid:CanStart{,Degraded} properties
David Zeuthen [Tue, 18 Dec 2012 20:07:48 +0000 (15:07 -0500)]
Remove MDRaid:CanStart{,Degraded} properties

This is actually very very hard to reliably figure out (it requires
intimate knowledge of the RAID superblocks on all currently-present
member devices), so don't pretend we know.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse both WWN and serials for VPD, if available
David Zeuthen [Mon, 17 Dec 2012 20:18:40 +0000 (15:18 -0500)]
Use both WWN and serials for VPD, if available

This fixes a problem with SAMSUNG drives returning the same WWN for
different drives:

 https://bugzilla.redhat.com/show_bug.cgi?id=887979

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoIntroduce new Job:Bytes and Job:Rate properties
David Zeuthen [Thu, 13 Dec 2012 18:28:54 +0000 (13:28 -0500)]
Introduce new Job:Bytes and Job:Rate properties

This allows GUI apps to show more detailed information, see e.g.

 http://people.freedesktop.org/~david/udisks-job-with-rate-and-bytes-info.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd support for UDISKS_CAN_POWER_OFF udev property
David Zeuthen [Tue, 11 Dec 2012 22:03:59 +0000 (17:03 -0500)]
Add support for UDISKS_CAN_POWER_OFF udev property

This can be used for devices that should be never powered off.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix docs for UDisksClient.queue_changed()
David Zeuthen [Mon, 10 Dec 2012 21:20:53 +0000 (16:20 -0500)]
Fix docs for UDisksClient.queue_changed()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd UDisksClient.queue_changed()
David Zeuthen [Mon, 10 Dec 2012 21:10:25 +0000 (16:10 -0500)]
Add UDisksClient.queue_changed()

It's sometimes useful to cause a UDisksClient::changed signal to be
emitted in the rate-limited fashion we already support. Add
functionality to do this.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake sure drive properties are updated after applying configuration
David Zeuthen [Mon, 10 Dec 2012 17:26:33 +0000 (12:26 -0500)]
Make sure drive properties are updated after applying configuration

... such as e.g. Drive:WriteCacheEnabled. It's a little icky how we
rely on 'change' uevent for this.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMention the right ATA subcommand for the ata-write-cache-enabled key
David Zeuthen [Fri, 7 Dec 2012 21:20:46 +0000 (16:20 -0500)]
Mention the right ATA subcommand for the ata-write-cache-enabled key

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: Fix up description of WriteCacheEnabled and document valid values
David Zeuthen [Fri, 7 Dec 2012 21:18:11 +0000 (16:18 -0500)]
docs: Fix up description of WriteCacheEnabled and document valid values

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd support for querying and configuring the Write Cache for ATA devices
David Zeuthen [Fri, 7 Dec 2012 20:47:02 +0000 (15:47 -0500)]
Add support for querying and configuring the Write Cache for ATA devices

http://people.freedesktop.org/~david/gnome-disks-write-cache-setting.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd support for setting the symbolic icon for a device
David Zeuthen [Wed, 5 Dec 2012 23:47:57 +0000 (18:47 -0500)]
Add support for setting the symbolic icon for a device

This is used in e.g. the GNOME desktop environemtn where both normal
and symbolic icons are now used.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksObjectInfo: fix memory leak
David Zeuthen [Wed, 5 Dec 2012 18:00:33 +0000 (13:00 -0500)]
UDisksObjectInfo: fix memory leak

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksObjectInfo: Add get_sort_key() method
David Zeuthen [Wed, 5 Dec 2012 17:58:02 +0000 (12:58 -0500)]
UDisksObjectInfo: Add get_sort_key() method

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse setup_by_user() in more places
David Zeuthen [Wed, 5 Dec 2012 16:00:27 +0000 (11:00 -0500)]
Use setup_by_user() in more places

This way the user is not bogged down in several places when trying to
operate on a RAID or loop device he has set up himself.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse --scan and --uuid when starting a MD-RAID device
David Zeuthen [Tue, 4 Dec 2012 20:58:41 +0000 (15:58 -0500)]
Use --scan and --uuid when starting a MD-RAID device

This way mdadm(8) will pick the device file itself and this ensures
that whatever is in /etc/mdadm.conf is used.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid.SetBitmapLocation() method
David Zeuthen [Fri, 30 Nov 2012 16:56:53 +0000 (11:56 -0500)]
Add MDRaid.SetBitmapLocation() method

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd new MDRaid.AddDevice() method
David Zeuthen [Thu, 29 Nov 2012 22:58:21 +0000 (17:58 -0500)]
Add new MDRaid.AddDevice() method

This is used to hot-add a device to a RAID array.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMention RAID split-brain syndrome
David Zeuthen [Thu, 29 Nov 2012 17:01:23 +0000 (12:01 -0500)]
Mention RAID split-brain syndrome

And also add a function UDisksClient.get_all_blocks_for_mdraid() so
GUIs can at least convey to the user that there's a problem.

GNOME Disks makes use of this to show both the underlying device files

http://people.freedesktop.org/~david/gnome-disks-mdraid-split-brain.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse 'drive-multidisk' instead of 'gdu-enclosure' for RAID arrays
David Zeuthen [Wed, 28 Nov 2012 20:45:26 +0000 (15:45 -0500)]
Use 'drive-multidisk' instead of 'gdu-enclosure' for RAID arrays

The 'gdu-enclosure' icon used to be in gnome-disk-utility which was
never right as it meant that gnome-disk-utility had to be installed in
order for the GIcon in the UDisksObjectInfo to make sense.

The 'drive-multidisk' icon was *just* added to gnome-icon-theme, see

 https://bugzilla.gnome.org/show_bug.cgi?id=684406
 http://git.gnome.org/browse/gnome-icon-theme/commit/?id=5644192d3f034ae614cddef2720f95408655dab3

See

 http://people.freedesktop.org/~david/gnome-disks-new-raid-icon.png

for its use in Disks.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAllow MDRaid.RemoveDevice() without authz if the caller started the array
David Zeuthen [Wed, 28 Nov 2012 19:12:30 +0000 (14:12 -0500)]
Allow MDRaid.RemoveDevice() without authz if the caller started the array

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix thinko in routine to find a free MD RAID device
David Zeuthen [Wed, 28 Nov 2012 17:33:35 +0000 (12:33 -0500)]
Fix thinko in routine to find a free MD RAID device

The idea is to count _down_ from md127, not up.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoKeep track of MD RAID arrays started/created via udisks
David Zeuthen [Wed, 28 Nov 2012 17:23:58 +0000 (12:23 -0500)]
Keep track of MD RAID arrays started/created via udisks

... and allow user to stop (via MDRaid.Stop()) and manipulate those
(via Filesystem.Mount(), Block.Format() etc). This is similar to what
we do for e.g. loop devices. The result is that the user is no longer
interrupted by password dialogs as e.g. pointed out in my Google+ post
here

 https://plus.google.com/110773474140772402317/posts/TPHVtY7myks

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAlways use .modify-device for devices set up by the calling user
David Zeuthen [Wed, 28 Nov 2012 17:16:24 +0000 (12:16 -0500)]
Always use .modify-device for devices set up by the calling user

Not e.g. .modify-device-system. Without this fix, the user cannot
format e.g. loop devices he has set up (and, with the following
commit, RAID arrays he has set up).

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd Block:Id property
David Zeuthen [Sat, 24 Nov 2012 19:20:19 +0000 (14:20 -0500)]
Add Block:Id property

This persistent and unique id is useful for a bunch of things, for
example Disks' benchmark dialog can use it as the filename for saving
benchmarking data for a block device (Disks is currently deriving the
filename from looking at symlinks).

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoEnsure HintAuto is FALSE for PC floppy drives
David Zeuthen [Thu, 22 Nov 2012 16:28:34 +0000 (11:28 -0500)]
Ensure HintAuto is FALSE for PC floppy drives

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate what symbolic icons to use
David Zeuthen [Tue, 20 Nov 2012 21:20:36 +0000 (16:20 -0500)]
Update what symbolic icons to use

It's not appropriate to use media-removable-symbolic for floppy or
flash media since that icon looks like a thumb drive. Use
media-floppy-symbolic and media-flash-symbolic instead.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake UDisksObjectInfo a GObject and hide its struct
David Zeuthen [Tue, 20 Nov 2012 19:20:15 +0000 (14:20 -0500)]
Make UDisksObjectInfo a GObject and hide its struct

Provide getter methods instead. This breaks library ABI (see
gnome-disk-utility for the required changes) but that's fine since
we're on an unstable branch.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksObjectInfo: Change format of one_liner
David Zeuthen [Tue, 20 Nov 2012 18:17:07 +0000 (13:17 -0500)]
UDisksObjectInfo: Change format of one_liner

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix grammar
David Zeuthen [Tue, 20 Nov 2012 17:26:00 +0000 (12:26 -0500)]
Fix grammar

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd missing since tag to newly added Drive.Ata.SmartSetEnabled() method
David Zeuthen [Tue, 20 Nov 2012 17:19:51 +0000 (12:19 -0500)]
Add missing since tag to newly added Drive.Ata.SmartSetEnabled() method

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate SMART data after enabling SMART
David Zeuthen [Tue, 20 Nov 2012 16:51:06 +0000 (11:51 -0500)]
Update SMART data after enabling SMART

Also ensure that updates are done atomically and sent out before the
SmartSetEnabled() method returns.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksLinuxDevice: add a reprobe_sync() method
David Zeuthen [Tue, 20 Nov 2012 16:50:38 +0000 (11:50 -0500)]
UDisksLinuxDevice: add a reprobe_sync() method

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix up docs
David Zeuthen [Mon, 19 Nov 2012 22:09:46 +0000 (17:09 -0500)]
Fix up docs

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd Drive.Ata.SmartSetEnabled() method
David Zeuthen [Mon, 19 Nov 2012 20:33:02 +0000 (15:33 -0500)]
Add Drive.Ata.SmartSetEnabled() method

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd a Drive.PowerOff() method
David Zeuthen [Mon, 19 Nov 2012 03:08:54 +0000 (22:08 -0500)]
Add a Drive.PowerOff() method

Right now we only support devices connected via USB but in the future
we can add support for other interconnects.

Also, since this operation may affect multiple drives, we also
introduce a Drive:SiblingId property so applications can do the right
thing.

http://people.freedesktop.org/~david/gnome-disks-power-off-drive-1.png
http://people.freedesktop.org/~david/gnome-disks-power-off-drive-2.png
http://people.freedesktop.org/~david/gnome-disks-power-off-drive-3.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd support for creating UDF filesystems using mkudffs(8)
David Zeuthen [Mon, 12 Nov 2012 04:59:46 +0000 (23:59 -0500)]
Add support for creating UDF filesystems using mkudffs(8)

This was requested in GNOME bug 633655.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoBlock.Format: add @update-partition-type option
David Zeuthen [Tue, 6 Nov 2012 17:11:25 +0000 (12:11 -0500)]
Block.Format: add @update-partition-type option

If this option is set to TRUE, we'll set the _natural_ partition type
for the requested filesystem, if one is available. For example, if
formatting a GPT partition with a FAT filesystem, the Microsoft Basic
Data partition type will be chosen; similar, if formatting a DOS
partition with a Ext4 filesystem then partition type 0x83 is chosen.

This feature was requested here

 https://bugzilla.gnome.org/show_bug.cgi?id=685871

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse gathered IDENTIFY DATA as primary way of identifying ATA devices
David Zeuthen [Mon, 5 Nov 2012 19:10:16 +0000 (14:10 -0500)]
Use gathered IDENTIFY DATA as primary way of identifying ATA devices

IOW, don't rely on ata_id to set the ATA_ID udev property.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoStop relying on ata_id to set ID_ATA_ROTATION_RATE_RPM
David Zeuthen [Mon, 5 Nov 2012 19:04:37 +0000 (14:04 -0500)]
Stop relying on ata_id to set ID_ATA_ROTATION_RATE_RPM

Get this directly from the IDENTIFY DATA itself.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoStop relying on ata_id to set ID_ATA_FEATURE_SET_SECURITY*
David Zeuthen [Mon, 5 Nov 2012 18:57:32 +0000 (13:57 -0500)]
Stop relying on ata_id to set ID_ATA_FEATURE_SET_SECURITY*

Get this directly from the IDENTIFY DATA itself.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't set AamVendorRecommendedValue unless AAM is actually supported
David Zeuthen [Mon, 5 Nov 2012 18:46:41 +0000 (13:46 -0500)]
Don't set AamVendorRecommendedValue unless AAM is actually supported

Otherwise it may contain junk.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoStop relying on ata_id to set ID_ATA_FEATURE_SET_{PM,APM,AAM}*
David Zeuthen [Mon, 5 Nov 2012 18:42:00 +0000 (13:42 -0500)]
Stop relying on ata_id to set ID_ATA_FEATURE_SET_{PM,APM,AAM}*

Get this directly from the IDENTIFY DATA itself.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoStop relying on ata_id to set ID_ATA_FEATURE_SET_SMART{,_ENABLED}
David Zeuthen [Mon, 5 Nov 2012 18:30:18 +0000 (13:30 -0500)]
Stop relying on ata_id to set ID_ATA_FEATURE_SET_SMART{,_ENABLED}

Get this directly from the IDENTIFY DATA itself.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd udisks_ata_identify_get_word() utility function
David Zeuthen [Mon, 5 Nov 2012 18:29:14 +0000 (13:29 -0500)]
Add udisks_ata_identify_get_word() utility function

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd logging statements so it's possible to pin-point probing time
David Zeuthen [Thu, 25 Oct 2012 23:15:31 +0000 (19:15 -0400)]
Add logging statements so it's possible to pin-point probing time

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksLinuxDevice: Don't include the parent_instance member in the docs
David Zeuthen [Thu, 25 Oct 2012 15:33:20 +0000 (11:33 -0400)]
UDisksLinuxDevice: Don't include the parent_instance member in the docs

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoForgot to add files
David Zeuthen [Wed, 24 Oct 2012 18:54:28 +0000 (14:54 -0400)]
Forgot to add files

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoIntroduce UDisksLinuxDevice as a replacement for GUdevDevice
David Zeuthen [Wed, 24 Oct 2012 17:40:38 +0000 (13:40 -0400)]
Introduce UDisksLinuxDevice as a replacement for GUdevDevice

This is essentially a GUdevDevice but with extra information such as
the probed ATA IDENTIFY data and, in the future, anything else we
might need.

The big idea here is that we want to depend _less_ on udev for
peripheral things that doesn't make sense to store in the udev
database, such as the properties in [1]. The win here is

 a. We can simplify ata_id somewhat - it still needs to extract serial
    numbers, WWNs etc. (because those are needed for symlinks in the
    /dev/disk/by-* hierarchy) but it does not need to extract and
    print what is in e.g. [1].

 b. If we need information in udisks from e.g. the ATA IDENTIFY data
    we don't need to add it to ata_id (or scsi_id or whatever), then
    wait for a systemd release and then instruct distributors to
    properly handle the dependency - instead, we can just access the
    IDENTIFY data ourselves. Much simpler and less error prone.

Since probing is synchronous, we create a thread for this and whenever
there's an uevent we push a new request onto a work queue. The probing
thread will handle incoming requests sequentially (in the future we
could have a pool of worker threads and run things in parallel) and
pop the results back to the main thread, also sequentially.

The only probing we have right now is for IDENTIFY DEVICE and IDENTIFY
PACKET DEVICE for ATA disks. We can add more in the future.

Note that this patch doesn't actually achieve b. yet - upcoming
patches will move from reading udev properties (such as looking at the
value of ID_ATA_FEATURE_SET_PM) to extracting this from the IDENTIFY
data itself.

[1] :
 # udevadm info -q all -n /dev/sda|grep ID_ATA_
 E: ID_ATA_DOWNLOAD_MICROCODE=1
 E: ID_ATA_FEATURE_SET_HPA=1
 E: ID_ATA_FEATURE_SET_HPA_ENABLED=1
 E: ID_ATA_FEATURE_SET_PM=1
 E: ID_ATA_FEATURE_SET_PM_ENABLED=1
 E: ID_ATA_FEATURE_SET_SECURITY=1
 E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
 E: ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=2
 E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=2
 E: ID_ATA_FEATURE_SET_SECURITY_FROZEN=1
 E: ID_ATA_FEATURE_SET_SMART=1
 E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
 E: ID_ATA_ROTATION_RATE_RPM=0
 E: ID_ATA_SATA=1
 E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
 E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
 E: ID_ATA_WRITE_CACHE=1
 E: ID_ATA_WRITE_CACHE_ENABLED=1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>