summaryrefslogtreecommitdiff
path: root/monitor/udisks2/gvfsudisks2drive.c
Commit message (Collapse)AuthorAgeFilesLines
* udisks2: Fix crashes caused by missing source tagwip/oholy/udisks2-timeouts-when-stoppingOndrej Holy2018-05-261-0/+1
| | | | | | | | GAsyncReadyCallback is never called from g_drive_stop, because source_tag is not set, but checked. This obviously causes issues for client applications. Add missing source_tag. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/1
* udisks2: Remove some gdu leftoversOndrej Holy2018-04-171-1/+1
| | | | | | udisks2 volume monitor contains some variables, or debug prints which contains gdu prefixes, or functionality. Let's rename, or remove that stuff.
* udisks2: Port GVfsUDisks2Drive to GTaskOndrej Holy2017-11-281-173/+72
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* udisks2: Refactor notification handlingOndrej Holy2017-01-111-2/+2
| | | | | | | | | The generic_text variable is used currently to determine which strings should be used for notifications. It is TRUE if unmounting (i.e. mount is set) and FALSE otherwise (i.e. drive is set). Remove this variable and make it more obvious... https://bugzilla.gnome.org/show_bug.cgi?id=775891
* monitor: Add g_drive_is_removable() supportOndrej Holy2016-05-201-2/+15
| | | | | | | | | | | | | | | Nautilus wants to show entries in the sidebar only for removable devices. It uses currently sort of conditions to determine which devices should be shown. Those condition fails in some cases unfortunatelly. Lets provide g_drive_is_removable() which uses udisks Removable property to determine which devices should be shown. It should return true for all drives with removable media, or flash media, or drives on usb and firewire buses. Add support for this property also in gvfs-mount tool. Bump GLib version accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=765457
* udisks2: Fix wrong types to avoid warningsOndrej Holy2016-04-291-1/+1
| | | | | | | Commit beea21e introduced incompatible-pointer-types warnings, because incompatible types was used. Fix the wrong types to avoid such warnings. https://bugzilla.gnome.org/show_bug.cgi?id=763890
* udisks2: Lock unlocked volumes on eject/stopOndrej Holy2016-04-061-56/+160
| | | | | | | | | | The eject/stop operation fails currently with "Cannot eject drive in use: Encrypted device /dev/sdb1 is unlocked" if any volume is unlocked and isn't mounted. The volume monitor is able to mount already unlocked volumes, so it should be able to eject unlocked volumes also. Lock the unlocked volumes if there are any before eject/stop operation. https://bugzilla.gnome.org/show_bug.cgi?id=763890
* udisks2: Do not show notification if unmount failedOndrej Holy2015-12-071-3/+3
| | | | | | | | | "You can now unplug..." notification is shown regardless of errors currently. Error dialog is shown together with this notification. Device might be still mounted and it might not be safe to unmount it. Therefore show this notification only if there are no errors. https://bugzilla.gnome.org/show_bug.cgi?id=746769
* udisks2: Compile function only if we have udisks >= 2.0.90Ross Lagerwall2013-11-301-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=712382
* udisks2: don't set GDrive.can_stop to TRUE if drive has removable mediaDavid Zeuthen2012-12-111-7/+12
| | | | | | | If the drive is using removable media, we want the shell and file manager to eject the media, not turn the drive off. Signed-off-by: David Zeuthen <zeuthen@gmail.com>
* If a drive is hotplugged and CanPowerOff is TRUE, set can_stop to TRUEDavid Zeuthen2012-12-111-5/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, USB-connected drives that appear *during* the user session will now be powered off when the user clicks the "Eject" icon in the GUI. This involves powering off the USB port typically resulting in LEDs and other user-visible features turning off. In particular, bus-powered HDDs will completely turn off by virtue of being, well, bus-powered. This is generally what users expect and should make them feel all cozy, warm inside and, most importantly, more confident removing the device now that the LED is off. Or something. Since we only do this for devices detected *during* the user session, we should not run into problems with internal USB devices such as laptop SD card readers or the various 4-in-1 flash card readers in many workstations. This is actually important because removing the power to the USB port of an "internal" device is generally a bad idea as it requires a system restart to make the laptop BIOS power the port up again (or the user to crack open the chassis). (No, unfortunately there is no *reliable* way to determine if a USB device is "internal" (e.g. reachable and/or servicable by the user) or not. There are a couple of mechanisms - one is to look at various USB device descriptors - but none of them seem very reliable. So instead we simply look at whether the device is hotplugged.) See also this udisks commit http://cgit.freedesktop.org/udisks/commit/?id=81dcb6eeaeceb6c6faae1a40a5b34a65cd5af653 introducing the Drive:CanPowerOff property and the Drive.PowerOff() method. Signed-off-by: David Zeuthen <zeuthen@gmail.com>
* Use UDisksObjectInfo API from udisks 2.0.90, if available, for symbolic iconsDavid Zeuthen2012-11-201-8/+58
| | | | | | | | | | | | Without this fix volumes would fall back to folder-remote-symbolic which is obviosly wrong. With this fix, it looks correct, see http://people.freedesktop.org/~david/gvfs-udisks2-symbolic-icons.png Right now we only use the API if it's available - things still work with udisks >= 1.97. Signed-off-by: David Zeuthen <zeuthen@gmail.com>
* Update the Address of the FSFFelix Möller2012-07-301-2/+2
| | | | | | | | | | | | | | | Updating the address of the FSF. This has been done by: while read file; do sed -i 's:59 Temple Place:51 Franklin Street:' $file sed -i 's:Suite 330:Fifth Floor:' $file sed -i 's:02111-1307:02110-1301:' $file done https://bugzilla.gnome.org/show_bug.cgi?id=656598 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* udisks2: implement show-unmount-progressCosimo Cecchi2012-07-111-1/+21
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=676111
* udisks2: simplify some codeCosimo Cecchi2012-07-111-4/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=676111
* udisks2: plug a memory leakCosimo Cecchi2012-07-111-9/+5
| | | | | | | | We were not free-ing the UnmountMountsOp structure when there was an error in one mount. Fix that and use g_list_free_full to make code more concise. https://bugzilla.gnome.org/show_bug.cgi?id=676111
* udisks2: Show "Eject Anyway" (not "Unmount Anyway") if ejectingDavid Zeuthen2012-05-151-0/+7
| | | | | | ... instead of unmounting. Signed-off-by: David Zeuthen <davidz@redhat.com>
* udisks2: set can_eject correctlyDavid Zeuthen2012-05-151-2/+1
| | | | | Yes, can_eject can be TRUE even if the media is not removable. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Update copyrightsDavid Zeuthen2012-01-201-1/+1
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Use Drive:Ejectable to determine if a drive is ejectableDavid Zeuthen2012-01-101-5/+1
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Use Drive:SortKey for sorting drive objectsDavid Zeuthen2012-01-101-5/+1
| | | | | | This ensures the drive sorting order defined by udisks is used. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Catch up with udisks change from major/minor to dev_tDavid Zeuthen2011-10-301-1/+1
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* udisks2: implement get_sort_key() methodsDavid Zeuthen2011-10-141-1/+24
| | | | | | This depends on the GIO patch in https://bugzilla.gnome.org/show_bug.cgi?id=661711 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Support floppy drivesDavid Zeuthen2011-10-101-2/+6
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* udisks2: Catch up with udisks changesDavid Zeuthen2011-09-301-6/+7
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* udisks2: nuke debug spewDavid Zeuthen2011-09-281-2/+0
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Map UDisksError to GIOError and use FAILED_HANDLED for dismissed polkit dialogsDavid Zeuthen2011-09-281-2/+7
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* udisks2: implement eject methodsDavid Zeuthen2011-09-281-2/+265
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* udisks2: implement mount and unmount methodsDavid Zeuthen2011-09-281-1/+1
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Implement rudimentary parts of the udisks2 volume monitorDavid Zeuthen2011-09-271-0/+449
Still a lot of stuff missing. Signed-off-by: David Zeuthen <davidz@redhat.com>