platform/upstream/udisks2.git
12 years agoFix up docs
David Zeuthen [Wed, 7 Dec 2011 16:59:07 +0000 (11:59 -0500)]
Fix up docs

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd Block.OpenForRestore() method
David Zeuthen [Mon, 5 Dec 2011 18:16:54 +0000 (13:16 -0500)]
Add Block.OpenForRestore() method

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd Block.OpenForBackup() method used for creating disk images
David Zeuthen [Thu, 1 Dec 2011 17:19:04 +0000 (12:19 -0500)]
Add Block.OpenForBackup() method used for creating disk images

See

 http://people.freedesktop.org/~david/gdu2-create-disk-image-1.png
 http://people.freedesktop.org/~david/gdu2-create-disk-image-2.png
 http://people.freedesktop.org/~david/gdu2-create-disk-image-3.png
 http://people.freedesktop.org/~david/gdu2-create-disk-image-4.png
 http://people.freedesktop.org/~david/gdu2-create-disk-image-5.png
 http://people.freedesktop.org/~david/gdu2-create-disk-image-6.png
 http://people.freedesktop.org/~david/gdu2-create-disk-image-7.png

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoDon't cleanup loop devices if backing device has major 0
David Zeuthen [Tue, 29 Nov 2011 21:59:33 +0000 (16:59 -0500)]
Don't cleanup loop devices if backing device has major 0

E.g. NFS mounts.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoFix compile warning
David Zeuthen [Tue, 29 Nov 2011 21:59:18 +0000 (16:59 -0500)]
Fix compile warning

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUDisksCleanup: Nuke error handling from user-level API
David Zeuthen [Tue, 29 Nov 2011 14:43:44 +0000 (09:43 -0500)]
UDisksCleanup: Nuke error handling from user-level API

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoGreatly simplify cleanup logic and routines
David Zeuthen [Tue, 29 Nov 2011 14:19:29 +0000 (09:19 -0500)]
Greatly simplify cleanup logic and routines

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUse /etc/bash_completion.d, not /etc/profile.d for bash completion script
David Zeuthen [Mon, 28 Nov 2011 15:32:51 +0000 (10:32 -0500)]
Use /etc/bash_completion.d, not /etc/profile.d for bash completion script

Also use _DATA, not _SCRIPTS, to ensure that the installed file is not
executable.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agointegration tests: small simplification
Martin Pitt [Mon, 7 Nov 2011 06:08:11 +0000 (07:08 +0100)]
integration tests: small simplification

Introduce "no_options" constant for an empty options variant.

12 years agoUse non-deprecated mutex and thread primitives in GLib 2.31 and later
David Zeuthen [Wed, 23 Nov 2011 14:55:00 +0000 (09:55 -0500)]
Use non-deprecated mutex and thread primitives in GLib 2.31 and later

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd new Job:Objects property and set it
David Zeuthen [Tue, 22 Nov 2011 18:48:50 +0000 (13:48 -0500)]
Add new Job:Objects property and set it

This can be used to render spinners, e.g.

 http://people.freedesktop.org/~david/gdu2-spinners.png

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoDon't distribute generated sources in tarballs
David Zeuthen [Tue, 22 Nov 2011 15:28:29 +0000 (10:28 -0500)]
Don't distribute generated sources in tarballs

... instead, insist that these sources are regenerated at build time.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUpdate misc files
David Zeuthen [Tue, 22 Nov 2011 15:01:47 +0000 (10:01 -0500)]
Update misc files

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMove udisks man page to section 8
David Zeuthen [Tue, 22 Nov 2011 14:55:39 +0000 (09:55 -0500)]
Move udisks man page to section 8

... from section 7. This is to avoid conflicts with the udisks(7) man
page from udisks 1.x.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd shell-snippet showing how to update the ATA smart data
David Zeuthen [Mon, 21 Nov 2011 18:36:22 +0000 (13:36 -0500)]
Add shell-snippet showing how to update the ATA smart data

  gdbus call --system --dest org.freedesktop.UDisks2 \
             --object-path /org/freedesktop/UDisks2/drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30039835 \
             --method org.freedesktop.UDisks2.Drive.Ata.SmartUpdate \
             "{'atasmart_blob': <'$ATA_SMART_BLOB'>}"

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd new Block:HintPartitionable property
David Zeuthen [Wed, 16 Nov 2011 21:27:22 +0000 (16:27 -0500)]
Add new Block:HintPartitionable property

This can be used in the UI to determine if a "Format Disk" (to
e.g. create a partition table) button should be offered.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd ReadOnly property to the Block interface
David Zeuthen [Wed, 16 Nov 2011 16:10:38 +0000 (11:10 -0500)]
Add ReadOnly property to the Block interface

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoWipe device before formatting it
David Zeuthen [Tue, 15 Nov 2011 20:13:31 +0000 (15:13 -0500)]
Wipe device before formatting it

It's better to not trust various mkfs tools etc. to get it right.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoActually wait for the right object when formatting a block device
David Zeuthen [Tue, 15 Nov 2011 20:04:42 +0000 (15:04 -0500)]
Actually wait for the right object when formatting a block device

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAllow user to manipulate partitions of a loop device if he set it up
David Zeuthen [Mon, 14 Nov 2011 20:35:11 +0000 (15:35 -0500)]
Allow user to manipulate partitions of a loop device if he set it up

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUse LO_FLAGS_PARTSCAN when setting up a loop device
David Zeuthen [Mon, 14 Nov 2011 19:28:22 +0000 (14:28 -0500)]
Use LO_FLAGS_PARTSCAN when setting up a loop device

Actually, use its value of 8 until 3.2 has been out long enough for us
to require it to be available and installed when compiling the code.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoPass UDisksObject so $(udisks2.device) is properly expanded
David Zeuthen [Mon, 14 Nov 2011 17:03:46 +0000 (12:03 -0500)]
Pass UDisksObject so $(udisks2.device) is properly expanded

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAllow creating partition tables with Block.Format()
David Zeuthen [Mon, 14 Nov 2011 16:44:58 +0000 (11:44 -0500)]
Allow creating partition tables with Block.Format()

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoSupport creating dos partitions
David Zeuthen [Thu, 10 Nov 2011 19:36:36 +0000 (14:36 -0500)]
Support creating dos partitions

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: add get_partitions() convenience method
David Zeuthen [Thu, 10 Nov 2011 18:08:54 +0000 (13:08 -0500)]
UDisksClient: add get_partitions() convenience method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoDon't support dos partitions of type 0x00
David Zeuthen [Wed, 9 Nov 2011 18:35:46 +0000 (13:35 -0500)]
Don't support dos partitions of type 0x00

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoFor dos partitions of type 0, output 0x00, not 0x0
David Zeuthen [Wed, 9 Nov 2011 18:35:13 +0000 (13:35 -0500)]
For dos partitions of type 0, output 0x00, not 0x0

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoRefuse to change partition type to an extended partition
David Zeuthen [Wed, 9 Nov 2011 18:17:19 +0000 (13:17 -0500)]
Refuse to change partition type to an extended partition

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoIntroduce UDisksPartitionTypeInfoFlags
David Zeuthen [Wed, 9 Nov 2011 16:52:44 +0000 (11:52 -0500)]
Introduce UDisksPartitionTypeInfoFlags

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoWhen creating a partition, ensure size is a multiple of 512
David Zeuthen [Wed, 9 Nov 2011 16:40:22 +0000 (11:40 -0500)]
When creating a partition, ensure size is a multiple of 512

Also account for parted(8) expecting the @end parameter to be
inclusive...

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoWhen creating a GPT partition, don't insist that the size is divisible by 1 MiB
David Zeuthen [Wed, 9 Nov 2011 16:18:46 +0000 (11:18 -0500)]
When creating a GPT partition, don't insist that the size is divisible by 1 MiB

... only insist that the partition start is. Also take the last 33
LBAs into account - this is not space we can use.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoFix ref count bug
David Zeuthen [Wed, 9 Nov 2011 16:01:17 +0000 (11:01 -0500)]
Fix ref count bug

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd the concept of partition table subtypes
David Zeuthen [Tue, 8 Nov 2011 18:13:56 +0000 (13:13 -0500)]
Add the concept of partition table subtypes

This makes it possible to clean up the UI like this

 http://people.freedesktop.org/~david/gdu2-partition-table-subtypes.png

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd PartitionTable.CreatePartition() method
David Zeuthen [Mon, 7 Nov 2011 20:19:11 +0000 (15:19 -0500)]
Add PartitionTable.CreatePartition() method

Right now it only works for 'gpt' (because parted(8) expects different
formats depending on the partition table type (!)) and it doesn't yet
set the partition type. Apart from that it works great.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoSynthesize 'change' uevent when deleting a partition
David Zeuthen [Mon, 7 Nov 2011 20:16:39 +0000 (15:16 -0500)]
Synthesize 'change' uevent when deleting a partition

Otherwise the udev database is not updated...

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agointegration tests: Test loop device creation/teardown
Martin Pitt [Mon, 7 Nov 2011 06:06:13 +0000 (07:06 +0100)]
integration tests: Test loop device creation/teardown

Test in read/write and readonly modes.

13 years agointegration tests: Test LUKS
Martin Pitt [Sat, 5 Nov 2011 23:22:12 +0000 (19:22 -0400)]
integration tests: Test LUKS

13 years agoAdd integration test suite
Martin Pitt [Sat, 5 Nov 2011 19:57:26 +0000 (15:57 -0400)]
Add integration test suite

This is the beginning of porting udisks1's "tests/run" integration test suite.
When running the suite from the source tree, this tests the daemon and library
from source tree; falls back on the installed system ones otherwise.

Currently covered are:

 - Creation and label handling on all supported file systems (including swap
   and empty)
 - cleanup after drive removal without unmount
 - UDisksDrive properties
 - picks up changes from command line tools like mkfs
 - correct file/dir/mountpoint permissions
 - SMART

13 years agoCall the right completion method
David Zeuthen [Thu, 3 Nov 2011 20:52:03 +0000 (16:52 -0400)]
Call the right completion method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd a Partition.Delete() method
David Zeuthen [Thu, 3 Nov 2011 18:04:36 +0000 (14:04 -0400)]
Add a Partition.Delete() method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoExport a Drive.Removable property
David Zeuthen [Thu, 3 Nov 2011 12:44:47 +0000 (08:44 -0400)]
Export a Drive.Removable property

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd Btrfs to list of known filesystems
David Zeuthen [Wed, 2 Nov 2011 21:41:29 +0000 (17:41 -0400)]
Add Btrfs to list of known filesystems

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoHandle the odd case when there is no partition table for a partition
David Zeuthen [Wed, 2 Nov 2011 21:16:20 +0000 (17:16 -0400)]
Handle the odd case when there is no partition table for a partition

This can happen when a device is ejected and it changes size to
zero. In that situation, old stale partition objects may be lying
around.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd support for creating encrypted devices in Block.Format()
David Zeuthen [Wed, 2 Nov 2011 20:23:25 +0000 (16:23 -0400)]
Add support for creating encrypted devices in Block.Format()

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUse luks-${UUID} instead of LUKS-udisks2-${UUID} to match the rest of the OS
David Zeuthen [Wed, 2 Nov 2011 20:22:09 +0000 (16:22 -0400)]
Use luks-${UUID} instead of LUKS-udisks2-${UUID} to match the rest of the OS

In particular, systemd uses luks-${UUID}

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoSupport option 'take-ownership' in the Block.Format() method
David Zeuthen [Wed, 2 Nov 2011 18:02:57 +0000 (14:02 -0400)]
Support option 'take-ownership' in the Block.Format() method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoRename Block.CreateFilesystem to Block.Format
David Zeuthen [Wed, 2 Nov 2011 15:32:34 +0000 (11:32 -0400)]
Rename Block.CreateFilesystem to Block.Format

... and other misc changes.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoBug 41931 — Add file system creation support
Martin Pitt [Tue, 25 Oct 2011 06:37:33 +0000 (08:37 +0200)]
Bug 41931 — Add file system creation support

For now this only supports the "label" option. Further features (LUKS, taking
ownership, etc.) will be delivered in future patches.

We still have a rather weird bug here: When udisksd calls mkfs.ext4, there is
no change uevent on the block device when it finishes, thus udev and udisks are
missing the newly created file system. This does not happen when calling
mkfs.ext4 from a shell. Work around this by triggering a change uevent after
mkfs.ext4 ourselves.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoReturn "Unknown" for unknown partition types
David Zeuthen [Mon, 31 Oct 2011 20:28:54 +0000 (16:28 -0400)]
Return "Unknown" for unknown partition types

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoPartition: Add Set{Name,Type,Flags} methods and implement for dos and gpt
David Zeuthen [Mon, 31 Oct 2011 19:57:14 +0000 (15:57 -0400)]
Partition: Add Set{Name,Type,Flags} methods and implement for dos and gpt

Using the parted(8), sfdisk(8) and sgdisk(8) commands.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: rename some methods and parameters
David Zeuthen [Mon, 31 Oct 2011 16:31:43 +0000 (12:31 -0400)]
UDisksClient: rename some methods and parameters

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoExport the dev_t instead of major/minor for block devices
David Zeuthen [Sun, 30 Oct 2011 16:25:55 +0000 (12:25 -0400)]
Export the dev_t instead of major/minor for block devices

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: Include partition flags in get_partition_info()
David Zeuthen [Sun, 30 Oct 2011 16:00:20 +0000 (12:00 -0400)]
UDisksClient: Include partition flags in get_partition_info()

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoEnsure 'dos' partition types always have two digits, e.g. 0x0c, not 0xc
David Zeuthen [Sat, 29 Oct 2011 15:28:52 +0000 (11:28 -0400)]
Ensure 'dos' partition types always have two digits, e.g. 0x0c, not 0xc

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUse a uint64 for partition flags instead of a string
David Zeuthen [Fri, 28 Oct 2011 18:40:53 +0000 (14:40 -0400)]
Use a uint64 for partition flags instead of a string

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: add get_partition_info() method
David Zeuthen [Fri, 28 Oct 2011 16:36:08 +0000 (12:36 -0400)]
UDisksClient: add get_partition_info() method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoFor serial numbers, only use ID_SERIAL_SHORT, never ID_SERIAL
David Zeuthen [Fri, 28 Oct 2011 15:29:32 +0000 (11:29 -0400)]
For serial numbers, only use ID_SERIAL_SHORT, never ID_SERIAL

In the case that no real serial number exists, ID_SERIAL is made up
from vendor/model e.g. ST360021_A-0:0 or MediaTek_DVD-ROM_1309. We
don't want to convey such lies.

On the other hand, we should be guaranteed if ID_SERIAL_SHORT is set,
then it is something we can actually trust to be somewhat unique.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoudisksctl: When setting up a loop device, don't free fd-list too soon
David Zeuthen [Wed, 26 Oct 2011 20:19:02 +0000 (16:19 -0400)]
udisksctl: When setting up a loop device, don't free fd-list too soon

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoInitialize variable to NULL
David Zeuthen [Wed, 26 Oct 2011 20:13:35 +0000 (16:13 -0400)]
Initialize variable to NULL

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: make settle() method emit any outstanding changes
David Zeuthen [Wed, 26 Oct 2011 18:59:07 +0000 (14:59 -0400)]
UDisksClient: make settle() method emit any outstanding changes

... and also document this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoDon't leak job objects
David Zeuthen [Wed, 26 Oct 2011 18:27:32 +0000 (14:27 -0400)]
Don't leak job objects

In particular, since each job has a GCancellable, this meant that we
were leaking an eventfd per job.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUse new /dev/loop-control device to create loop devices
David Zeuthen [Wed, 26 Oct 2011 17:32:31 +0000 (13:32 -0400)]
Use new /dev/loop-control device to create loop devices

See

 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=770fe30a46a12b6fb6b63fbe1737654d28e84844

for the commit that introduced this feature. This is available as of
Linux 3.1.

Second, since the kernel now (virtually) supports an unlimited number
of loop devices, allow local active users to do this without having to
authenticate.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoNuke debug spew
David Zeuthen [Wed, 26 Oct 2011 17:13:55 +0000 (13:13 -0400)]
Nuke debug spew

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoHandle the case where blkid(8) detects both a filesystem and a partition table
David Zeuthen [Tue, 25 Oct 2011 20:42:09 +0000 (16:42 -0400)]
Handle the case where blkid(8) detects both a filesystem and a partition table

The F15 x86_64 live cd is both an ISO filesystem and a partition
table, presumably on purpose:

 # blkid -o udev -p ~davidz/Downloads/Fedora-15-x86_64-Live-Desktop.iso
 ID_FS_LABEL=Fedora-15-x86_64-Live-Desktop.is
 ID_FS_LABEL_ENC=Fedora-15-x86_64-Live-Desktop.is
 ID_FS_TYPE=iso9660
 ID_FS_USAGE=filesystem
 ID_PART_TABLE_TYPE=dos

If just used on an optical disc this presents no problem per se
because the kernel does not create partitions. However, if you dd the
image to a USB stick, the kernel will in fact recognize the partition
table and create a partition for it:

 # blkid -o udev -p /dev/sdb
 ID_FS_LABEL=Fedora-15-x86_64-Live-Desktop.is
 ID_FS_LABEL_ENC=Fedora-15-x86_64-Live-Desktop.is
 ID_FS_TYPE=iso9660
 ID_FS_USAGE=filesystem
 ID_PART_TABLE_TYPE=dos

 # blkid -o udev -p /dev/sdb1
 ID_FS_LABEL=Fedora-15-x86_64-Live-Desktop.is
 ID_FS_LABEL_ENC=Fedora-15-x86_64-Live-Desktop.is
 ID_FS_TYPE=iso9660
 ID_FS_USAGE=filesystem
 ID_PART_TABLE_TYPE=dos
 ID_PART_ENTRY_SCHEME=dos
 ID_PART_ENTRY_TYPE=0x17
 ID_PART_ENTRY_FLAGS=0x80
 ID_PART_ENTRY_NUMBER=1
 ID_PART_ENTRY_OFFSET=0
 ID_PART_ENTRY_SIZE=1161216
 ID_PART_ENTRY_DISK=8:16

There is nothing, per se, wrong with this ... except that applications
(such as udisks and GNOME sitting on top) need to be careful and not
e.g. offer *two icons* for the iso9660 filesystem (one for sdb and one
for sdb1).

The fix is fortunately simple - we only allow a 'disk' block device to
be a PartitionTable or a Filesystem and not both at the same time. The
way we do this is to look at whether the kernel has already
partitioned the device or not (and this works only because the kernel
partiitoner guarantees that partition kobjects are created prior to
announcing the 'disk' block device).

Also stress in the docs that applications shouldn't be looking at
IdUsage or IdType (a direct copy of whatever blkid(8) puts in the udev
database) and that they instead should be looking at what D-Bus
interfaces are implemented.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd properties to identify extended and logical dos partitions
David Zeuthen [Mon, 24 Oct 2011 16:58:10 +0000 (12:58 -0400)]
Add properties to identify extended and logical dos partitions

This allows to remove special-casing of dos and 0x05, 0x0f and 0x85
partition types in each client.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUse glib top-level includes
David Zeuthen [Mon, 24 Oct 2011 14:47:13 +0000 (10:47 -0400)]
Use glib top-level includes

glib HEAD complains about this now

 /usr/include/glib-2.0/glib/gtypes.h:28:2: error: #error "Only <glib.h> can be included directly."

Also nuke some trailing whitespace.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoBug 41862 — Add label changing for previously supported file systems
Martin Pitt [Mon, 17 Oct 2011 09:53:39 +0000 (11:53 +0200)]
Bug 41862 — Add label changing for previously supported file systems

Add support for label changing on vfat, ntfs, xfs, reiserfs, and nilfs2 file
systems.

Instead of having another huge if-then-else ladder as in udisks1, use a lookup
table _fs_info. For now this contains the commands for label changing and
erasing, but will be extended in the future to contain the commands for
creating and checking file systems.

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

13 years agoUpdate internal man page links
David Zeuthen [Sun, 23 Oct 2011 16:26:59 +0000 (12:26 -0400)]
Update internal man page links

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd links to udisks(7) man page) for the Hint* properties
David Zeuthen [Sun, 23 Oct 2011 16:26:45 +0000 (12:26 -0400)]
Add links to udisks(7) man page) for the Hint* properties

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoMove all utility functions to the UDisksClient type
David Zeuthen [Sun, 23 Oct 2011 16:06:26 +0000 (12:06 -0400)]
Move all utility functions to the UDisksClient type

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoRemove unused functions for doc sections file
David Zeuthen [Sat, 22 Oct 2011 14:31:04 +0000 (10:31 -0400)]
Remove unused functions for doc sections file

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd Partition{,Table} interfaces and rely on blkid(8) partition properties
David Zeuthen [Fri, 21 Oct 2011 19:12:23 +0000 (15:12 -0400)]
Add Partition{,Table} interfaces and rely on blkid(8) partition properties

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoudisks: Also accept a --no-debug option and use it for activation
David Zeuthen [Tue, 18 Oct 2011 17:51:47 +0000 (13:51 -0400)]
udisks: Also accept a --no-debug option and use it for activation

Otherwise syslog gets spammed via D-Bus' system bus activation helper
via systemd (got it? got it!).

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoHACKING: Update URLs
Martin Pitt [Mon, 17 Oct 2011 13:16:11 +0000 (15:16 +0200)]
HACKING: Update URLs

DK-disks → udisks

13 years agoUpdate docs
David Zeuthen [Fri, 14 Oct 2011 17:35:29 +0000 (13:35 -0400)]
Update docs

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoExport Time{,Media}Detected properties on UDisksDrive
David Zeuthen [Fri, 14 Oct 2011 17:31:19 +0000 (13:31 -0400)]
Export Time{,Media}Detected properties on UDisksDrive

This is used to e.g. sort the returned items in the GVfs udisks2
backend.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoFix speling
David Zeuthen [Thu, 13 Oct 2011 14:53:56 +0000 (10:53 -0400)]
Fix speling

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: Initialize method timeout to infinite for all interface proxies
David Zeuthen [Tue, 11 Oct 2011 14:22:52 +0000 (10:22 -0400)]
UDisksClient: Initialize method timeout to infinite for all interface proxies

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd description for ZFS devices
David Zeuthen [Tue, 11 Oct 2011 11:38:31 +0000 (07:38 -0400)]
Add description for ZFS devices

With things like http://zfsonlinux.org/ having ZFS devices on a Linux
system is not unexpected. So we should show something meaningful.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoFix property reference
David Zeuthen [Tue, 11 Oct 2011 00:14:24 +0000 (20:14 -0400)]
Fix property reference

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoSupport PC-style floppy drives
David Zeuthen [Mon, 10 Oct 2011 20:25:01 +0000 (16:25 -0400)]
Support PC-style floppy drives

This is achieved by introducing properties

 MediaAvailable
 MediaChangeDetected

on the Drive interface.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: add get_block_for_dev() method
David Zeuthen [Thu, 6 Oct 2011 14:32:06 +0000 (10:32 -0400)]
UDisksClient: add get_block_for_dev() method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: Handle when an interface is no longer associated with an object
David Zeuthen [Mon, 3 Oct 2011 21:30:20 +0000 (17:30 -0400)]
UDisksClient: Handle when an interface is no longer associated with an object

This can happen if e.g. performing an operation that is canceled when
a device has been yanked by the user. The obvious example is waiting
for the user to enter a password while holding a reference to an
UDisksEncrypted instance.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoIgnore uevent if so requested by device-mapper
David Zeuthen [Mon, 3 Oct 2011 20:56:02 +0000 (16:56 -0400)]
Ignore uevent if so requested by device-mapper

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: add get_object() and peek_object() convenience methods
David Zeuthen [Mon, 3 Oct 2011 20:04:55 +0000 (16:04 -0400)]
UDisksClient: add get_object() and peek_object() convenience methods

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoCombine entry and monitor API reference for mounts, fstab and crypttab
David Zeuthen [Mon, 3 Oct 2011 19:27:48 +0000 (15:27 -0400)]
Combine entry and monitor API reference for mounts, fstab and crypttab

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: add a rate-limited ::change signal
David Zeuthen [Fri, 30 Sep 2011 16:51:59 +0000 (12:51 -0400)]
UDisksClient: add a rate-limited ::change signal

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: add get_cleartext_block() method
David Zeuthen [Fri, 30 Sep 2011 16:05:53 +0000 (12:05 -0400)]
UDisksClient: add get_cleartext_block() method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoMake udisks_util_get_drive_info() a method on UDisksClient
David Zeuthen [Fri, 30 Sep 2011 14:03:36 +0000 (10:03 -0400)]
Make udisks_util_get_drive_info() a method on UDisksClient

And also make it use the HintName and HintIconName properties.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoClarify docs for udisks_client_get_block_for_drive()
David Zeuthen [Fri, 30 Sep 2011 13:33:52 +0000 (09:33 -0400)]
Clarify docs for udisks_client_get_block_for_drive()

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoAdd properties about currently inserted optical media to the drive interface
David Zeuthen [Thu, 29 Sep 2011 18:01:05 +0000 (14:01 -0400)]
Add properties about currently inserted optical media to the drive interface

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoReorder some properties
David Zeuthen [Thu, 29 Sep 2011 14:28:26 +0000 (10:28 -0400)]
Reorder some properties

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoIntroduce DeviceBusy error and use it in Filesystem.Unmount()
David Zeuthen [Wed, 28 Sep 2011 18:32:34 +0000 (14:32 -0400)]
Introduce DeviceBusy error and use it in Filesystem.Unmount()

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: add get_drive_for_block() method
David Zeuthen [Wed, 28 Sep 2011 14:04:09 +0000 (10:04 -0400)]
UDisksClient: add get_drive_for_block() method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUDisksClient: add get_block_for_drive() method
David Zeuthen [Tue, 27 Sep 2011 16:08:37 +0000 (12:08 -0400)]
UDisksClient: add get_block_for_drive() method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUpdate docs
David Zeuthen [Fri, 23 Sep 2011 14:23:28 +0000 (10:23 -0400)]
Update docs

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoMake it possible to simulate SMART data on devices that don't support SMART
David Zeuthen [Sat, 3 Sep 2011 14:16:40 +0000 (10:16 -0400)]
Make it possible to simulate SMART data on devices that don't support SMART

This is useful in e.g. VirtualBox.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoDocument the atasmart_blob option
David Zeuthen [Fri, 2 Sep 2011 20:21:38 +0000 (16:21 -0400)]
Document the atasmart_blob option

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUpdate SMART functionality
David Zeuthen [Fri, 2 Sep 2011 20:07:00 +0000 (16:07 -0400)]
Update SMART functionality

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoCatch up with GLib changes
David Zeuthen [Thu, 1 Sep 2011 19:18:54 +0000 (15:18 -0400)]
Catch up with GLib changes

s/g_unix_signal_add_watch_full/g_unix_signal_add_full/

Signed-off-by: David Zeuthen <davidz@redhat.com>