David Zeuthen [Mon, 14 Mar 2011 21:24:52 +0000 (17:24 -0400)]
Export udisks_util_get_media_compat_for_display()
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 14 Mar 2011 11:13:24 +0000 (07:13 -0400)]
Cope with the fact that ID_FS_VERSION is udev encoded
For example, LVM2 PVs have version LVM2\x20001 which should be
presented as "LVM2 001".
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 14 Mar 2011 10:59:46 +0000 (06:59 -0400)]
Capitalize short filesystem names
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 14 Mar 2011 10:57:26 +0000 (06:57 -0400)]
Fix copy-paste error for short filesystem name
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 14 Mar 2011 10:55:51 +0000 (06:55 -0400)]
Show 'Unknown' for unknown volume, not a blank string
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 14 Mar 2011 10:44:07 +0000 (06:44 -0400)]
Use /dev/mapper/vg-FOO-lv-BAR instead of /dev/dm-0 as PreferredDevice for LVM2
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 13 Mar 2011 20:49:54 +0000 (16:49 -0400)]
Fix typo so fs labels on mounted filesystems can be changed
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 13 Mar 2011 19:56:44 +0000 (15:56 -0400)]
Add FilesystemSetLabel method
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 13 Mar 2011 18:43:24 +0000 (14:43 -0400)]
Nuke helper option for now
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 13 Mar 2011 18:12:42 +0000 (14:12 -0400)]
Fix warnings triggered by gcc 4.6
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 13 Mar 2011 16:03:50 +0000 (12:03 -0400)]
Add udisks_util_get_part_types_for_scheme() util function
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 11 Mar 2011 23:34:21 +0000 (18:34 -0500)]
Add functions to get human-readable strings for partitions and filesystems
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 10 Mar 2011 22:57:54 +0000 (17:57 -0500)]
Export partition label and UUID
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 10 Mar 2011 20:18:37 +0000 (15:18 -0500)]
Add a CryptoBackingDevice property on BlockDevice for dm-crypt
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 10 Mar 2011 17:19:04 +0000 (12:19 -0500)]
Make the Size property on BlockDevice be 0 if no media is available
Also unify code for determing device size for Lun and BlockDevice.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 10 Mar 2011 17:18:53 +0000 (12:18 -0500)]
Add PartEntryNumber attribute to the BlockDevice interface
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 9 Mar 2011 17:40:45 +0000 (12:40 -0500)]
Add utility function to get info about a LUN
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 8 Mar 2011 22:43:16 +0000 (17:43 -0500)]
Add a Size property to the Lun interface
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 8 Mar 2011 19:24:26 +0000 (14:24 -0500)]
Add LoopBackingFile property to BlockDevice
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 8 Mar 2011 18:16:45 +0000 (13:16 -0500)]
Demote complaint about no serial/wwn on block device from warning to debug
Now that we're using block devices instead of scsi devices for this,
it's far more common to run into block devices without any serial
number or WWN.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 8 Mar 2011 18:10:01 +0000 (13:10 -0500)]
Minor updates
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 6 Mar 2011 15:08:30 +0000 (10:08 -0500)]
Remove TODO
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 6 Mar 2011 15:01:03 +0000 (10:01 -0500)]
Fix PolicyKit policy file
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 6 Mar 2011 13:31:42 +0000 (08:31 -0500)]
Add UDisksClient
This class will be used for all the common things that clients such as
udisksctl(1) and palimpsest will need to do.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sat, 5 Mar 2011 15:50:03 +0000 (10:50 -0500)]
Improve how data is collected in the fallback branch for LUN
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sat, 5 Mar 2011 15:44:50 +0000 (10:44 -0500)]
Use block instead of scsi devices for LUNs
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 4 Mar 2011 18:13:37 +0000 (13:13 -0500)]
Actually make the libudisks2 library work for 3rd party apps
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 2 Mar 2011 19:56:25 +0000 (14:56 -0500)]
Rename Drive to LUN
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 2 Mar 2011 19:42:45 +0000 (14:42 -0500)]
Handle removing a drive correctly
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 17 Feb 2011 19:22:22 +0000 (14:22 -0500)]
Don't show partitions in udisksctl status output
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 17 Feb 2011 19:00:28 +0000 (14:00 -0500)]
Rework how serial numbers are handled
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 17 Feb 2011 16:36:14 +0000 (11:36 -0500)]
Add a PreferredDevice property
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 17 Feb 2011 16:19:06 +0000 (11:19 -0500)]
Fix spelling of property names
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 17 Feb 2011 15:57:13 +0000 (10:57 -0500)]
Add properties for partition tables and entries
Right now we rely on the existing UDISKS_PARTITION* properties from an
existing udisks 1.x installation. Long-term we are going to switch to
the blkid stuff.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 16 Feb 2011 20:30:00 +0000 (15:30 -0500)]
Fix up docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 16 Feb 2011 20:26:12 +0000 (15:26 -0500)]
Move contents of BlockDevice.Probed and Filesystem into the BlockDevice iface
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 16 Feb 2011 18:46:07 +0000 (13:46 -0500)]
Avoid multiple Drive objects with the same VPD
So the way this works is that with multiple paths, more than one block
device will point to the Drive in question.
$ ./udisksctl status
PORT MODEL REVISION SERIAL BLOCK
--------------------------------------------------------------------------------
HP LOGICAL VOLUME 3.00
5001438008F61790 sda sda1 sda2
SEAGATE ST3300657SS 0006 3SJ1QNMQ00009052NECM sdan sdl
SEAGATE ST3300657SS 0006 3SJ1RFP900009051HZ5S sdaf sdd
SEAGATE ST3300657SS 0006 3SJ1RJS700009050VYEA sdal sdj
SEAGATE ST3300657SS 0006 3SJ1RPFJ00009052BZ10 sdah sdf
SEAGATE ST3300657SS 0006 3SJ1RSJC00009052MWTB sdam sdk
SEAGATE ST3300657SS 0006 3SJ1RWZ100009101T12H sdai sdg
SEAGATE ST3300657SS 0006 3SJ1S3NE00009101TB5Y sdao sdm
SEAGATE ST3300657SS 0006 3SJ1S40K00009101T1XU sdak sdi
SEAGATE ST3300657SS 0006 3SJ1S4MH00009052RG6Z sdae sdc
SEAGATE ST3300657SS 0006 3SJ1S66L00009052QGZA sdag sde
SEAGATE ST3300657SS 0006 3SJ1S7C500009052RKPP sdaj sdh
SEAGATE ST3300657SS 0006 3SJ1S7K600009051M0CE sdad sdb
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30010853 sds
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30012560 sdn
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30014347 sdac
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30021345 sdaa
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30024753 sdt
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30025874 sdw
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30030732 sdr
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30031826 sdv
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30032003 sdz
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30039741 sdp
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30063724 sdx
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30064055 sdq
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30064486 sdy
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30064749 sdo
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30065104 sdu
WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30067287 sdab
Still need to hook up support for dm-multipath such that we get e.g.
SEAGATE ST3300657SS 0006 3SJ1QNMQ00009052NECM sdan sdl mpatha
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 16 Feb 2011 17:04:15 +0000 (12:04 -0500)]
Drop Controller, AtaDrive and ScsiDrive interfaces (for now)
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 16 Feb 2011 16:26:05 +0000 (11:26 -0500)]
Move object path and interface names to the UDisks2 name-space
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 15 Feb 2011 19:59:18 +0000 (14:59 -0500)]
Probe LUNs for device information
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 15 Feb 2011 19:41:22 +0000 (14:41 -0500)]
Nuke all custom udev rules
Current code-base actually don't yet depend on these. Additionally,
the long-term plan is to have as few udev rules / custom probers as
possible - for example, we will use blkid(1)'s partition table probing
and so on.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 15 Feb 2011 18:56:03 +0000 (13:56 -0500)]
Make parallel installable with udisks version 1
This includes renaming a bunch of stuff so we don't conflict. For now
we ignore collisions in man pages. We still have to rename object
paths and interfaces.
Also bump to version 1.90. First stable release will be 2.0.
Another huge user-visible change is that the udisks(1) command has
been renamed to udisksctl(1).
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 15 Feb 2011 16:59:34 +0000 (11:59 -0500)]
For now, don't enable -Werror by default, not even in maintainer mode
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 15 Feb 2011 16:27:59 +0000 (11:27 -0500)]
Catch up with latest gdbus-codegen
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 8 Nov 2010 15:25:39 +0000 (10:25 -0500)]
Show controllers
Signed-off-by: David Zeuthen <davidz@redhat.com>
Martin Pitt [Wed, 3 Nov 2010 22:15:36 +0000 (18:15 -0400)]
Fix uninitialized variables in mounted_fs_entry_is_valid()
Don't unref uninizialized variables in mounted_fs_entry_is_valid() if the hash
table lookup fails and we exit (goto out) early.
Fixes this compiler warning/error:
cc1: warnings being treated as errors
udiskspersistentstore.c: In function ‘udisks_persistent_store_mounted_fs_cleanup’:
udiskspersistentstore.c:563:13: error: ‘block_device_file_value’ may be used uninitialized in this function
Martin Pitt [Wed, 3 Nov 2010 22:08:23 +0000 (18:08 -0400)]
Fix uninitialized variables in udisks_daemon_log_valist()
Assert that we don't get an undefined log level in udisks_daemon_log_valist().
This avoids falling through the switch and using uninitialized string
variables.
Fixes these warnings/errors:
cc1: warnings being treated as errors
udisksdaemon.c: In function ‘udisks_daemon_log’:
udisksdaemon.c:782:16: error: ‘level_str’ may be used uninitialized in this function
udisksdaemon.c:783:16: error: ‘level_color_str’ may be used uninitialized in this function
udisksdaemon.c:784:8: error: ‘syslog_priority’ may be used uninitialized in this function
David Zeuthen [Tue, 2 Nov 2010 14:03:27 +0000 (10:03 -0400)]
Add a --controller option to 'udisks info'
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Nov 2010 22:11:08 +0000 (18:11 -0400)]
Add Address and PhysicalSlot properties to Controller interface
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Nov 2010 21:47:20 +0000 (17:47 -0400)]
Add missing files
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Nov 2010 21:46:10 +0000 (17:46 -0400)]
Add org.freedesktop.UDisks.Controller interface
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Nov 2010 18:27:17 +0000 (14:27 -0400)]
Add --drive option to info verb of udisks(1) command
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Nov 2010 18:11:31 +0000 (14:11 -0400)]
Show block device in status output
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Nov 2010 17:28:12 +0000 (13:28 -0400)]
Properly sort according to CTDS
So it looks like e.g. this
$ udisks status
CTDS MODEL REVISION SERIAL BLOCK
--------------------------------------------------------------------------------
0:0:0:0 SEAGATE ST3300657SS 0006 3SJ1S7K600009051M0CE -
0:0:1:0 SEAGATE ST3300657SS 0006 3SJ1S4MH00009052RG6Z -
0:0:2:0 SEAGATE ST3300657SS 0006 3SJ1RFP900009051HZ5S -
0:0:3:0 SEAGATE ST3300657SS 0006 3SJ1S66L00009052QGZA -
0:0:4:0 SEAGATE ST3300657SS 0006 3SJ1RPFJ00009052BZ10 -
0:0:5:0 SEAGATE ST3300657SS 0006 3SJ1RWZ100009101T12H -
0:0:6:0 SEAGATE ST3300657SS 0006 3SJ1S7C500009052RKPP -
0:0:7:0 SEAGATE ST3300657SS 0006 3SJ1S40K00009101T1XU -
0:0:8:0 SEAGATE ST3300657SS 0006 3SJ1RJS700009050VYEA -
0:0:9:0 SEAGATE ST3300657SS 0006 3SJ1RSJC00009052MWTB -
0:0:10:0 SEAGATE ST3300657SS 0006 3SJ1QNMQ00009052NECM -
0:0:11:0 SEAGATE ST3300657SS 0006 3SJ1S3NE00009101TB5Y -
0:0:13:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30012560 -
0:0:14:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30064749 -
0:0:15:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30039741 -
0:0:16:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30064055 -
0:0:17:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30030732 -
0:0:18:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30010853 -
0:0:19:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30024753 -
0:0:20:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30065104 -
0:0:21:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30031826 -
0:0:22:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30025874 -
0:0:23:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30063724 -
0:0:24:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30064486 -
0:0:25:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30032003 -
0:0:26:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30021345 -
0:0:27:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30067287 -
0:0:28:0 WDC WD1002FAEX-00Y9A0 01.01V10 WD-WCAW30014347 -
0:0:30:0 SEAGATE ST3300657SS 0006 3SJ1S7K600009051M0CE -
0:0:31:0 SEAGATE ST3300657SS 0006 3SJ1S4MH00009052RG6Z -
0:0:32:0 SEAGATE ST3300657SS 0006 3SJ1RFP900009051HZ5S -
0:0:33:0 SEAGATE ST3300657SS 0006 3SJ1S66L00009052QGZA -
0:0:34:0 SEAGATE ST3300657SS 0006 3SJ1RPFJ00009052BZ10 -
0:0:35:0 SEAGATE ST3300657SS 0006 3SJ1RWZ100009101T12H -
0:0:36:0 SEAGATE ST3300657SS 0006 3SJ1S7C500009052RKPP -
0:0:37:0 SEAGATE ST3300657SS 0006 3SJ1S40K00009101T1XU -
0:0:38:0 SEAGATE ST3300657SS 0006 3SJ1RJS700009050VYEA -
0:0:39:0 SEAGATE ST3300657SS 0006 3SJ1RSJC00009052MWTB -
0:0:40:0 SEAGATE ST3300657SS 0006 3SJ1QNMQ00009052NECM -
0:0:41:0 SEAGATE ST3300657SS 0006 3SJ1S3NE00009101TB5Y -
1:0:0:0 HP LOGICAL VOLUME 3.00
5001438008F61790 -
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Nov 2010 17:15:08 +0000 (13:15 -0400)]
Add a 'status' verb to udisks(1)
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Nov 2010 15:21:20 +0000 (11:21 -0400)]
Improve drive object paths slightly
Example:
$ udisks info --object-path drives/
drives/HP_LOGICAL_VOLUME_5001438008F61790
drives/SEAGATE_ST3300657SS_3SJ1QNMQ00009052NECM
drives/SEAGATE_ST3300657SS_3SJ1QNMQ00009052NECM_1
drives/SEAGATE_ST3300657SS_3SJ1RFP900009051HZ5S
drives/SEAGATE_ST3300657SS_3SJ1RFP900009051HZ5S_1
drives/SEAGATE_ST3300657SS_3SJ1RJS700009050VYEA
drives/SEAGATE_ST3300657SS_3SJ1RJS700009050VYEA_1
drives/SEAGATE_ST3300657SS_3SJ1RPFJ00009052BZ10
drives/SEAGATE_ST3300657SS_3SJ1RPFJ00009052BZ10_1
drives/SEAGATE_ST3300657SS_3SJ1RSJC00009052MWTB
drives/SEAGATE_ST3300657SS_3SJ1RSJC00009052MWTB_1
drives/SEAGATE_ST3300657SS_3SJ1RWZ100009101T12H
drives/SEAGATE_ST3300657SS_3SJ1RWZ100009101T12H_1
drives/SEAGATE_ST3300657SS_3SJ1S3NE00009101TB5Y
drives/SEAGATE_ST3300657SS_3SJ1S3NE00009101TB5Y_1
drives/SEAGATE_ST3300657SS_3SJ1S40K00009101T1XU
drives/SEAGATE_ST3300657SS_3SJ1S40K00009101T1XU_1
drives/SEAGATE_ST3300657SS_3SJ1S4MH00009052RG6Z
drives/SEAGATE_ST3300657SS_3SJ1S4MH00009052RG6Z_1
drives/SEAGATE_ST3300657SS_3SJ1S66L00009052QGZA
drives/SEAGATE_ST3300657SS_3SJ1S66L00009052QGZA_1
drives/SEAGATE_ST3300657SS_3SJ1S7C500009052RKPP
drives/SEAGATE_ST3300657SS_3SJ1S7C500009052RKPP_1
drives/SEAGATE_ST3300657SS_3SJ1S7K600009051M0CE
drives/SEAGATE_ST3300657SS_3SJ1S7K600009051M0CE_1
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30010853
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30012560
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30014347
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30021345
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30024753
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30025874
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30030732
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30031826
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30032003
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30039741
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30063724
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30064055
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30064486
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30064749
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30065104
drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30067287
Note that the SEAGATE drives appear twice because of multiple paths to
each drive (each SAS drive has two ports).
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Nov 2010 14:59:25 +0000 (10:59 -0400)]
Catch up with latest gdbus-codegen and use this to make better drive paths
E.g.
$ udisks info --object-path drives/ <TAB>
drives/INTEL_20SSDSA2MH080G1GCCVEM842101HD080DGN
drives/MATSHITADVD_2fCDRW_20UJDA775
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 31 Oct 2010 16:16:58 +0000 (12:16 -0400)]
Only consider SCSI devices with type 0x00 and 0x05 as drives
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 31 Oct 2010 16:06:06 +0000 (12:06 -0400)]
Make udisks_decode_udev_string() accept NULL strings
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 31 Oct 2010 15:54:16 +0000 (11:54 -0400)]
Add org.freedesktop.UDisks.Drive interfaces
This relies on a set of udev patches that sets ID_* on scsi_device
sysfs devices instead of just the block devices.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 25 Oct 2010 20:02:34 +0000 (16:02 -0400)]
Add a couple of more errors
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 25 Oct 2010 19:19:02 +0000 (15:19 -0400)]
Make udisks(8) spawn a textual authentication agent if one is needed
See http://hal.freedesktop.org/docs/polkit/PolkitAgentTextListener.html
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 25 Oct 2010 18:47:59 +0000 (14:47 -0400)]
Update udisks(1) man page
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 25 Oct 2010 17:39:30 +0000 (13:39 -0400)]
Use gchar, not char
This makes it easier to figure out when to use g_free() vs. free().
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 25 Oct 2010 17:35:17 +0000 (13:35 -0400)]
Also use --object-path/-p for udisks info
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 25 Oct 2010 17:32:28 +0000 (13:32 -0400)]
Check with polkit whether the user is authorized to mount the device
Also make the udisks program accept mount/unmount options and the
desired file system type.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 21 Oct 2010 21:11:29 +0000 (17:11 -0400)]
Start implementing Mount() and Unmount() on the Filesystem interface
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 12 Oct 2010 18:00:33 +0000 (14:00 -0400)]
Rename library to libudisks-2.0.so and provide a pkg-config(1) file
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 27 Sep 2010 19:13:12 +0000 (15:13 -0400)]
Don't create two GUdevClient objects - share a single one instead
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 27 Sep 2010 17:49:08 +0000 (13:49 -0400)]
Add new abstract ConfigurationItem interface and a /etc/fstab implementation
The idea is that we will use this for all sorts of configuration for
devices that need assembly (e.g. MD, LVM), unlocking (LUKS) and other
things.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 24 Sep 2010 16:29:12 +0000 (12:29 -0400)]
Use generated GDBusProxyManager subclass from latest gdbus-codegen(1)
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 22 Sep 2010 22:07:38 +0000 (18:07 -0400)]
udisks(1): implement mount and unmount verbs
Still not very useful
- The daemon isn't doing anything useful yet
- We probably want to take options that can be passed to the Mount()
and Unmount() methods
but it's a good start.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Sep 2010 17:48:44 +0000 (13:48 -0400)]
udisks: Use --block-device in 'info' verb instead of just --device
Later on we probably want other kinds of references such as
udisks info --block-device /dev/sda
udisks info --job 042_format_dev_sdb1
udisks info --enclosure Promise_VTrak_J630SS
so we shouldn't claim the word "device" for block devices files.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Sep 2010 17:43:55 +0000 (13:43 -0400)]
Run 'udisks dump' in the pager if stdin/stdout are TTYs
This is like e.g. git-diff(1).
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Sep 2010 16:25:07 +0000 (12:25 -0400)]
If both stdin/stdout are TTYs, provide colorful output
See http://people.freedesktop.org/~david/udisks-command-in-living-color.png
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Sep 2010 22:04:41 +0000 (18:04 -0400)]
Also show interfaces+properties when an object is added
$ udisks monitor
Monitoring the udisks daemon. Press Ctrl+C to exit.
18:04:29.489: The udisks-daemon is running (name-owner :1.267).
18:04:30.845: Added /org/freedesktop/UDisks/devices/mmcblk0
org.freedesktop.UDisks.BlockDevice:
Device: /dev/mmcblk0
Major: 179
Minor: 0
Size:
1015808000
Symlinks: /dev/block/179:0
/dev/disk/by-id/mmc-SD01G_0x50882907
/dev/disk/by-path/pci-0000:05:00.2
org.freedesktop.UDisks.LinuxSysfsDevice:
Subsystem: block
SysfsPath: /sys/devices/pci0000:00/0000:00:1e.0/0000:05:00.2/mmc_host/mmc0/mmc0:9ffc/block/mmcblk0
18:04:30.912: Added /org/freedesktop/UDisks/devices/mmcblk0p1
org.freedesktop.UDisks.BlockDevice:
Device: /dev/mmcblk0p1
Major: 179
Minor: 1
Size:
499998720
Symlinks: /dev/block/179:1
/dev/disk/by-id/mmc-SD01G_0x50882907-part1
/dev/disk/by-path/pci-0000:05:00.2-part1
org.freedesktop.UDisks.LinuxSysfsDevice:
Subsystem: block
SysfsPath: /sys/devices/pci0000:00/0000:00:1e.0/0000:05:00.2/mmc_host/mmc0/mmc0:9ffc/block/mmcblk0/mmcblk0p1
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Sep 2010 21:58:58 +0000 (17:58 -0400)]
Show interface properties when adding an interface
Again, when doing mkfs then wiping a block device, this is the output
we get:
$ udisks monitor
Monitoring the udisks daemon. Press Ctrl+C to exit.
17:56:39.132: The udisks-daemon is running (name-owner :1.267).
17:56:43.189: /org/freedesktop/UDisks/devices/mmcblk0p1: Received signal org.freedesktop.UDisks.LinuxSysfsDevice::UEvent (b'change',)
17:56:43.192: /org/freedesktop/UDisks/devices/mmcblk0p1: Added interface org.freedesktop.UDisks.BlockDevice.Probed
Label: foo
Type: vfat
UUID: 11AC-D2FD
Usage: filesystem
Version: FAT16
17:56:43.194: /org/freedesktop/UDisks/devices/mmcblk0p1: Added interface org.freedesktop.UDisks.Filesystem
MountPoint:
17:56:43.197: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.BlockDevice: Properties Changed
Symlinks: /dev/block/179:1
/dev/disk/by-id/mmc-SD01G_0x50882907-part1
/dev/disk/by-path/pci-0000:05:00.2-part1
/dev/disk/by-uuid/11AC-D2FD
/dev/disk/by-label/foo
17:56:50.956: /org/freedesktop/UDisks/devices/mmcblk0p1: Received signal org.freedesktop.UDisks.LinuxSysfsDevice::UEvent (b'change',)
17:56:50.957: /org/freedesktop/UDisks/devices/mmcblk0p1: Removed interface org.freedesktop.UDisks.BlockDevice.Probed
17:56:50.958: /org/freedesktop/UDisks/devices/mmcblk0p1: Removed interface org.freedesktop.UDisks.Filesystem
17:56:50.958: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.BlockDevice: Properties Changed
Symlinks: /dev/block/179:1
/dev/disk/by-id/mmc-SD01G_0x50882907-part1
/dev/disk/by-path/pci-0000:05:00.2-part1
^C
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Sep 2010 21:48:16 +0000 (17:48 -0400)]
Add a 'monitor' verb to the udisks command
If we run these commands
# mkfs.vfat -n "foo" /dev/mmcblk0p1
mkfs.vfat 3.0.9 (31 Jan 2010)
# mount /dev/mmcblk0p1 /media/Foo5/
# umount /media/Foo5
# dd if=/dev/zero of=/dev/mmcblk0p1 bs=512 count=100
100+0 records in
100+0 records out
51200 bytes (51 kB) copied, 0.0327893 s, 1.6 MB/s
then we get this output
$ udisks monitor
Monitoring the udisks daemon. Press Ctrl+C to exit.
17:44:08.566: The udisks-daemon is running (name-owner :1.267).
17:44:15.418: /org/freedesktop/UDisks/devices/mmcblk0p1: Received signal org.freedesktop.UDisks.LinuxSysfsDevice::UEvent (b'change',)
17:44:15.419: /org/freedesktop/UDisks/devices/mmcblk0p1: Added interface org.freedesktop.UDisks.BlockDevice.Probed
17:44:15.420: /org/freedesktop/UDisks/devices/mmcblk0p1: Added interface org.freedesktop.UDisks.Filesystem
17:44:15.421: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.BlockDevice: Properties Changed
Symlinks: /dev/block/179:1
/dev/disk/by-id/mmc-SD01G_0x50882907-part1
/dev/disk/by-path/pci-0000:05:00.2-part1
/dev/disk/by-uuid/E2F3-2C42
/dev/disk/by-label/foo
17:44:24.466: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.Filesystem: Properties Changed
MountPoint: /media/Foo5
17:44:29.582: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.Filesystem: Properties Changed
MountPoint:
17:44:34.586: /org/freedesktop/UDisks/devices/mmcblk0p1: Received signal org.freedesktop.UDisks.LinuxSysfsDevice::UEvent (b'change',)
17:44:34.589: /org/freedesktop/UDisks/devices/mmcblk0p1: Removed interface org.freedesktop.UDisks.BlockDevice.Probed
17:44:34.589: /org/freedesktop/UDisks/devices/mmcblk0p1: Removed interface org.freedesktop.UDisks.Filesystem
17:44:34.589: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.BlockDevice: Properties Changed
Symlinks: /dev/block/179:1
/dev/disk/by-id/mmc-SD01G_0x50882907-part1
/dev/disk/by-path/pci-0000:05:00.2-part1
which is actually very nice.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Sep 2010 21:31:05 +0000 (17:31 -0400)]
Actually remove the object on "remove" event
Duh!
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Sep 2010 21:25:15 +0000 (17:25 -0400)]
Fixup finalization order to avoid warnings when disconnecting signals
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Sep 2010 19:46:58 +0000 (15:46 -0400)]
Make udisks(1) actually show some information
Looks like this
$ udisks info --device /dev/sda1
/org/freedesktop/UDisks/devices/sda1:
org.freedesktop.UDisks.BlockDevice:
Device: /dev/sda1
Major: 8
Minor: 1
Size:
80025223168
Symlinks: /dev/block/8:1
/dev/disk/by-id/ata-INTEL_SSDSA2MH080G1GC_CVEM842101HD080DGN-part1
/dev/disk/by-id/scsi-SATA_INTEL_SSDSA2MH0CVEM842101HD080DGN-part1
/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part1
/dev/disk/by-uuid/
4e057fd9-bae5-4a12-83b5-
2f654d42edb1
/dev/disk/by-label/Fedora-13-x86_64
/dev/disk/by-id/wwn-0x5001517387d61905-part1
org.freedesktop.UDisks.BlockDevice.Probed:
Label: Fedora-13-x86_64
Type: ext4
UUID:
4e057fd9-bae5-4a12-83b5-
2f654d42edb1
Usage: filesystem
Version: 1.0
org.freedesktop.UDisks.Filesystem:
MountPoint: /
org.freedesktop.UDisks.LinuxSysfsDevice:
Subsystem: block
SysfsPath: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
Also add a dump verb to dump everything.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Sep 2010 16:27:45 +0000 (12:27 -0400)]
Use bytestring for strings that are not guaranteed to be UTF-8
This requires gdbus-codegen(1) master.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 13 Sep 2010 17:39:16 +0000 (13:39 -0400)]
Dynamically update the UDisksFilesystem:MountPoint property
In other words.. use the UDisksMountMonitor machinery added in the
previous commits.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 13 Sep 2010 17:38:35 +0000 (13:38 -0400)]
Remove debug spew
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 13 Sep 2010 17:19:36 +0000 (13:19 -0400)]
Add UDisksMountMonitor and UDisksMount
This is basically a port from the old sources. Now to use it.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 10 Sep 2010 20:44:23 +0000 (16:44 -0400)]
Fixup doc indenting
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 10 Sep 2010 16:19:05 +0000 (12:19 -0400)]
Handle the org.fd.UDisks.Job.Cancel() method in the base job class
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 9 Sep 2010 21:16:07 +0000 (17:16 -0400)]
Factor common job features into a base class
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 9 Sep 2010 20:38:54 +0000 (16:38 -0400)]
Add UDisksThreadedJob class
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 21:58:06 +0000 (17:58 -0400)]
Add UDisksError to the docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 21:51:07 +0000 (17:51 -0400)]
Build fixes / cleanups
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 21:39:22 +0000 (17:39 -0400)]
Fix build
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 21:25:28 +0000 (17:25 -0400)]
Add UDisksError error domain and use it
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 20:09:39 +0000 (16:09 -0400)]
Fix reference count SNAFU
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 19:26:22 +0000 (15:26 -0400)]
Make it possible to pass a string to the helper via stdin
This is needed for e.g. passing a pass-phrase to cryptsetup(8).
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 18:51:27 +0000 (14:51 -0400)]
Don't mix up stdout and stderr
Repeated runs of the test suite, like this
$ while `/bin/true` ; do ./udisks-test || break ; done
actually triggered this error.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 18:36:53 +0000 (14:36 -0400)]
UDisksSpawnedJob: Add test case for binary output
Also try to use this facility from UDisksFilesystemImpl:
$ gdbus call --system --dest org.freedesktop.UDisks --object-path /org/freedesktop/UDisks/devices/mmcblk1p1 --method org.freedesktop.UDisks.Filesystem.Mount "" "[]"
('/foobar',)
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 15:17:07 +0000 (11:17 -0400)]
Add some more spawn tests
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 14:15:46 +0000 (10:15 -0400)]
Break test suite into separate cases
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 8 Sep 2010 14:03:54 +0000 (10:03 -0400)]
Add a test suite
These are unit-tests that check each class/type - it is not the same
as Martin Pitt's test suite which is more like integration testing
that pokes the daemon's D-Bus interface. We need both.
Signed-off-by: David Zeuthen <davidz@redhat.com>