summaryrefslogtreecommitdiff
path: root/monitor
Commit message (Collapse)AuthorAgeFilesLines
...
* monitor: Make MountOpReply2 interface expansiblewip/oholy/support-tcryptOndrej Holy2018-07-133-26/+51
| | | | | | | The newly introduced MountOpReply2 interface is not expansible and future changes would mean other complications. Let's make the interface expansible thanks to a{sv} expansion argument instead of adding new and new arguments and fallbacks...
* monitor: Simplify comments for translatorsOndrej Holy2018-07-131-4/+2
| | | | | | Simplify comments for translators to make them oneline. Multiline comments seems doesn't work and the first part of the comment is not really useful anyway.
* monitor: Remove unused variables from MountOpReplyDataOndrej Holy2018-07-131-9/+9
| | | | | The newly added MountOpReplyData contains variables which are not later used. Let's remove those unused variables.
* udisks2: Support TCRYPT devicessegfault2018-07-135-59/+210
| | | | | | | | Add support for unlocking TrueCrypt and VeraCrypt compatible (TCRYPT) volumes. Add a new MountOpReply2 method to the dbus interface, which handles the parameters required to unlock TCRYPT volumes.
* Revert "Do not require the latest glib version"Ondrej Holy2018-07-101-4/+1
| | | | This reverts commit 550aaf87c222a1626273e579e566f889b43006cf.
* Do not require the latest glib versionOndrej Holy2018-05-301-1/+4
| | | | | The proposed GitLab CI uses Fedora Rawhide which doesn't include the latest GLib yet. Let's use g_unix_mount_get_options conditionaly.
* 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: Handle x-gvfs- options not only for fstab entriesOndrej Holy2018-05-231-3/+13
| | | | | | | | | | | | | | GVfsUDisks2VolumeMonitor handles x-gvfs-hide/x-gvfs-show mount options used to overwrite our heuristics whether the mount should be shown, or hidden. Unfortunately, it works currently only for mounts with corresponding fstab entries, because the options are read over g_unix_mount_point_get_options. Let's use the newly introduced g_unix_mount_get_options to allow reading of the options for all sort of mounts (e.g. created over pam_mount, or manually mounted). Update GLib dependency accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=795578
* gphoto2: Switch to a stable device uriPhilip Langdale2018-04-181-5/+55
| | | | | | | | | | | | | For the same reasons that the equivalent change to the mtp backend was desirable, we want to do this in the gphoto2 (ptp) backend. Stable URIs allow things like bookmarking and external scripting to work across plug/unplug events (which is to say, allows them to work at all). See the change description for the mtp backend for more details. https://bugzilla.gnome.org/show_bug.cgi?id=795311
* udisks2: Remove some gdu leftoversOndrej Holy2018-04-173-13/+9
| | | | | | udisks2 volume monitor contains some variables, or debug prints which contains gdu prefixes, or functionality. Let's rename, or remove that stuff.
* Remove libgdu supportOndrej Holy2018-04-1714-6843/+0
| | | | | libgdu has been removed in 2011 and is superseded by libudisks2, so there is no need to have gdu volume monitor in the tree.
* mtp: Switch to a stable device uriPhilip Langdale2018-04-161-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we generate our device uris using the USB bus number and device number. The device number is a monotonically increasing number that goes up for each new device plugged into a bus, and that includes replugging a device. This is inconvenient for a couple of reasons: 1: Modern Android devices actually trigger a replug event when you switch them into File Transfer mode, so if you, or your file manager opens a window before switching modes, that window ends up being useless. 2: You can't write automation that encodes device uris as these end up being unpredictable This commit implements a change to the device uri to use the ID_SERIAL field provided by udev. If the device has a serial number, it will be combined with the product identity to yield this value. If the device has no serial number, then udev will fallback to using product identity only. The end result is that a device with a real serial number will always appear with the same uri, regardless of when or where it is plugged in. If a device has no serial number, or has a broken one (eg: all zeros, all the time), then one such device will work fine, but if a second one is plugged in, it will be ignored. We have chosen to ignore the device to avoid implementing a fallback uri generation scheme. The code becomes slightly more complicated because you cannot directly look up a device in this way, and libmtp works with dev/bus numbers. That requires a couple of additional lookups, but it's nothing serious. Note that this does not perfectly fix problem 1) because there's no event triggered which causes Nautilus to refresh the device window. If you manually refresh, you will see the contents. https://bugzilla.gnome.org/show_bug.cgi?id=789561 https://bugzilla.gnome.org/show_bug.cgi?id=744267
* udisks2: Remove optical disc volumes/mounts if drive disappearsOndrej Holy2018-04-131-77/+38
| | | | | | | | | | | | | | | | | | If an optical drive is hard-unplugged without ejecting a media first (or the corresponding UDisksDrive object simply disappears from D-Bus for example due to the udisksd termination) and an audio disk or an empty media is inside, corresponding volumes/mounts are not properly removed. Consequently, the number of the volumes/mounts increase when plugging and unplugging such drive. This happens because those kinds of volumes/ mounts are handled by their drives in the monitor. Unfortunately, the drive is removed before processing them and the mounts/volumes without the drives are ignored consequently. Let's do not rely on the drives and handle those volumes/mounts over corresponding UDisksBlock objects, same as it is done for other kinds of volumes. https://bugzilla.gnome.org/show_bug.cgi?id=719423
* build: Remove autotoolsIñigo Martínez2018-04-0613-526/+0
| | | | | | | To avoid the burden of maintaining multiple build systems, this patch removes autotools support. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* Remove redundant gmodule.h includesOndrej Holy2018-04-035-5/+0
| | | | | | | | Our codes don't use GModule APIs directly, so there is no need for gmodule.h includes. GModule has been replaced by GIOModule in our codes long time ago. gmodule.h is included indirectly over gio.h anyway. https://bugzilla.gnome.org/show_bug.cgi?id=794365
* build: Revise dependenciesIñigo Martínez2018-04-037-19/+35
| | | | | | | | | | | | | | | gvfs is using a set of glib libraries (gio-2.0, gio-unix-2.0, glib, gobject-2.0) in almost all the created objects. However, these dependencies are not always necessary. gvfs' meson port also uses some internal dependencies formed by built libraries. This internal dependencies depend on other dependendecies as well. These both issues have been fixed by reviewing all the internal dependencies and built objects. https://bugzilla.gnome.org/show_bug.cgi?id=794365
* mtp: Ignore devices without a device fileBastien Nocera2018-03-011-3/+10
| | | | | | | If there's no device file, which means libusb won't be able to open the device, no need to print a warning, simply ignore the device. https://bugzilla.gnome.org/show_bug.cgi?id=793925
* gphoto2: Ignore devices without a device fileBastien Nocera2018-03-011-9/+19
| | | | | | | If there's no device file, which means libusb won't be able to open the device, no need to print a warning, simply ignore the device. https://bugzilla.gnome.org/show_bug.cgi?id=793925
* udisks2: Add support for PARTLABEL and PARTUUIDOndrej Holy2018-02-201-0/+53
| | | | | | | Currently, PARTLABEL and PARTUUID is not handled and consequently redundant GVfsUDisks2Volume is presented. Add support for them. https://bugzilla.gnome.org/show_bug.cgi?id=793545
* udisks2: Fix UUID matchingOndrej Holy2018-02-201-2/+2
| | | | | | | "device + 6" is used to skip "UUID=" prefix in the string, but it should be "device + 5" since it has only 5 chars. https://bugzilla.gnome.org/show_bug.cgi?id=793545
* Add missing casts for g_object_refOndrej Holy2018-02-088-12/+12
| | | | | g_object_ref() currently propagates parameter type to its return value, so type casts needs to be added in order to prevent compiler warnings.
* build: Fix gdu monitor build when gudev is disabledTing-Wei Lan2018-01-241-1/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=786149
* udisks2: Restore Unicode quotation marksPiotr Drąg2017-11-281-1/+1
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772219
* proxy: Port GProxyDrive to GTaskOndrej Holy2017-11-281-225/+131
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* proxy: Port GProxyMount to GTaskOndrej Holy2017-11-281-69/+53
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* proxy: Port GProxyVolume to GTaskOndrej Holy2017-11-281-82/+49
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* udisks2: Port GVfsUDisks2Mount to GTaskOndrej Holy2017-11-281-209/+157
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* udisks2: Port GVfsUDisks2Utils to GTaskOndrej Holy2017-11-281-76/+43
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* udisks2: Port GVfsUDisks2Volume to GTaskOndrej Holy2017-11-281-226/+157
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* 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
* build: Make SystemdService entry conditionalIñigo Martínez2017-11-076-59/+114
| | | | | | | | | | | | When systemd user units installation is disabled, SystemdService entry should also not be present on D-Bus service files. This patch adds a common D-Bus service file template allowing, an homogeneus D-Bus service file generation and also a SystemService entry conditioned to the systemd user units installation option. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Fix GIO_MODULE_DIR in GDU volume monitorIñigo Martínez2017-11-071-1/+1
| | | | | | | The GIO_MODULE_DIR macro is using an invalid variable for GIO module dir. This patch fixes the variable name. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Enable elogind support in mesonIñigo Martínez2017-11-012-3/+3
| | | | | | | This patch adds support for elogind in meson, which is systemd-login extracted as a standalone package. https://bugzilla.gnome.org/show_bug.cgi?id=788707
* build: Improve installation on system pathsIñigo Martínez2017-10-316-18/+18
| | | | | | | | | | | | Instead of being hardcoded, D-Bus, systemd and GIO modules paths can be checked by using the information in their correspondant pkg-config files. This patch uses the information on pkg-config files by default, and also allows the user to provide this information to avoid overwriting system files. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Fix missing GDU monitor service fileIñigo Martínez2017-10-311-0/+2
| | | | | | | | | The GDU monitor service file is not created properly due to missing service name variable declaration. This patch adds the variable declaration which fixes the problem. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Reorder meson options and update descriptionOndrej Holy2017-10-311-1/+1
| | | | | | | | meson_options.txt is hard to read. Let's create sorted groups of options and unify the description. Also change some option names to match correspoding backend names. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Port to meson build systemIñigo Martínez2017-10-3117-0/+468
| | | | | | | | meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* monitor: Remove device file checksOndrej Holy2017-10-314-4/+4
| | | | | | | | The device file checks were added by mistake and it is not clear whether it can't have some side-effect. Let's remove them and use g_strcmp0 for sysfs path comparison for sure... https://bugzilla.gnome.org/show_bug.cgi?id=789491
* gphoto2: Fix wrong format specifier in debug printOndrej Holy2017-10-311-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=789491
* gphoto2: Uncomment debug printsOndrej Holy2017-10-271-12/+8
| | | | | | | | It doesn't make sense to have commented g_debug prints, then they are totally unusable. Let's uncomment them, so they can be printed if G_MESSAGES_DEBUG is specified... https://bugzilla.gnome.org/show_bug.cgi?id=789491
* gphoto2: Fix volume removal with current udev behaviorOndrej Holy2017-10-271-11/+6
| | | | | | | | UDev events for devices without ID_GPHOTO2 property are ignored. Although ID_GPHOTO2 seems don't have to be set for device when removing and thus the volume is not removed. Let's ignore ID_GPHOTO2 when removing. https://bugzilla.gnome.org/show_bug.cgi?id=789491
* mtp: Fix volume removal with current udev behaviorOndrej Holy2017-10-261-11/+6
| | | | | | | | UDev events for devices without ID_MTP_DEVICE property are ignored. Although ID_MTP_DEVICE seems don't have to be set for device when removing and thus the volume is not removed. Let's ignore ID_MTP_DEVICE when removing. https://bugzilla.gnome.org/show_bug.cgi?id=789491
* proxy: Fix shadow mount handling for equal pathsOndrej Holy2017-08-211-1/+2
| | | | | | | | | | | | Automatic shadow mount handling in some cases works currently only thanks to the bug in g_daemon_file_prefix_matches implementation, which I am going to fix. The problematic case is when activation_root is equal to mount_root (e.g. Nextcloud integration). The bug in _prefix_matches causes that it succeeds also if the paths are equal, but this is wrong as per the docs. Let's use also g_file_equal when looking for shadow mounts in order to fix this issue. https://bugzilla.gnome.org/show_bug.cgi?id=786217
* goa: Fix password-based authenticationOndrej Holy2017-07-191-1/+1
| | | | | | | | | Password-based authentication used for ownCloud/Nextcloud was broken by GTask port (commit fdda284). GTask is used as user_data for async callbacks currently, however, user_data is incorrectly cast to MountOp in this case. Use g_task_get_task_data in order to fix this issue. https://bugzilla.gnome.org/show_bug.cgi?id=780496
* udisks2: Refactor notification handlingOndrej Holy2017-01-114-15/+9
| | | | | | | | | 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
* udisks2: Improve unmount notificationsOndrej Holy2017-01-111-4/+4
| | | | | | | Do not address the user directly in the strings. Add a missing description for the notifications. https://bugzilla.gnome.org/show_bug.cgi?id=775891
* monitor: Mark error strings as translatableOndrej Holy2017-01-061-13/+13
| | | | | | | Error strings in gvfsproxyvolumemonitordaemon.c are not marked as translatable and thus it might be shown untranslated in UI, mark them. https://bugzilla.gnome.org/show_bug.cgi?id=776616
* udisks2: Always use generic notification when unmountingOndrej Holy2016-11-181-1/+1
| | | | | | | | | | | | "You can now unplug %s\n" is used for mounts with filesystem, "%s has been unmounted\n" is used otherwise when unmounting. It is confusing to say "unplug" for drives with multiple mounts, or for drives, which need to be ejected, or stopped. I think "unplug" should be used only when ejecting, or stopping. It might lead to data loss if user unplug the device after unmounting one of several mounts. https://bugzilla.gnome.org/show_bug.cgi?id=774192
* udisks2: Add support for uuidOndrej Holy2016-11-101-0/+6
| | | | | | | | gvfs_udisks2_volume_get_uuid returns NULL regardless of the output from udisks_block_get_id_uuid currently. Set volume->uuid property and handle its changes properly. https://bugzilla.gnome.org/show_bug.cgi?id=772894
* goa: Port GVfsGoaVolume to GTaskOndrej Holy2016-10-261-103/+69
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412