| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
D-Bus doesn't like NULL strings, and the proxy code will
crash if we don't have a HAL UDI.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works with the ID_GPHOTO2 attribute, which was recently added to
libgphoto2:
http://sourceforge.net/tracker/?func=detail&aid=2801117&group_id=8874&atid=308874
That initial libgphoto2 patch does not yet pass the actual name, and just sets
ID_GPHOTO2="1". However, in this patch we check if it's not "1", and use that
as volume name (since it's the "best" one). Otherwise fall back to usb_id and
sysfs vendor/model/product names.
This also supports ID_MEDIA_PLAYER* attributes for media players with gphoto
support. Please see here for the discussion and development progress:
http://lists.freedesktop.org/archives/devkit-devel/2009-June/000226.html
http://cgit.freedesktop.org/~teuf/media-player-id/
http://bugzilla.gnome.org/show_bug.cgi?id=586410
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Port everything to use _with_operation() variants of unmount/eject
methods
- Add support for g_file_poll_mountable()
- new job class: GVfsJobPollMountable
- Pass mount operation for unmount/eject ops on GDaemonFile and
GDaemonMount
- receive in the appropriate GVfsJob classes
- also pass unmount flags where it was missing
- port all backends to use this
- Teach GMountSource and GMountOperationDBus about the new
GMountOperation::show-processes signal
- also provide new API
- g_mount_source_is_dummy() - e.g. when the client didn't
passed NULL for the GMountOperation
- g_mount_source_abort() - to send the ::abort signal to the
client-side GMountOperation
- make the client-side of GMountSource return ::reply with
NOT_HANDLED when we do an abort
- Refactor the mount operation handling in GProxyVolumeMonitor
- Pass mount operation for unmount/ejects in GProxyVolumeMonitor
- Pass the process id of the actual reader/writer in OpenForRead
and OpenForWrite daemon methods
- add some private API for making the FUSE client set the
pid of the POSIX client (otherwise it looks like the FUSE
client is blocking) and pass the right pid.
This is because the FUSE client is basically impersonating the
POSIX processes.
- Make the process id mentioned above available in appropriate
GVfsJob classes
- GVfsJobOpenForRead
- GVfsJobOpenForWrite
- GVfsChannel
- Provide API to get a list of all blocking clients, e.g. an array
of GPid
- g_vfs_daemon_get_blocking_processes()
- Provide convenience API to easily doing the right thing on unmount;
e.g. interact with the user about blocking processes - see the gphoto2
backend for example usage
- g_vfs_backend_has_blocking_processes()
- g_vfs_backend_unmount_with_operation() and
g_vfs_backend_unmount_with_operation_finish()
- Only the gphoto2 backend supports ::show-processes right now. Support
for other backends will be added shortly.
- Implement support for ::show-processes in the GDU volume monitor
- right now we don't support "Unmount Anyway" since it requires
ABI changes in libgdu.so - this will be changed as soon as there's
a new gnome-disk-utility release
|
|
|
|
|
|
|
|
|
| |
This is the GVfs implementation for the new GIO API for
starting/stopping drives. See
http://bugzilla.gnome.org/show_bug.cgi?id=585591
for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PC Floppy Drives are handled in a special way since we don't poll for
media (it would make a lot of noise). Specifically we never probe for
the filesystem type. So if encountering a PC Floppy Drive, just always
show all volumes from it. Since we already have working support for
g_drive_poll_for_media() in Nautilus, things Just Work(tm)
http://people.freedesktop.org/~david/dkd-gnome-floppy-welcome-to-the-1980s.png
E.g. you can use the "Rescan" menu option to force media detection.
Welcome to the 1980s.
|
|
|
|
| |
Never use blank/empty drive names.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See this commit
http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/commit/?id=5b7350df8b63cf4178a2fe69ee740b5222130421
for details about DriveDetach(). In a nutshell it allows us to offer
an Eject() option on USB enclosures. Currently we don't do this since
such devices don't have removable media.
With this change, we'll set can_eject to TRUE if the device is
detachable. If the device is both detachable and removable, we prefer
Eject over Detach() when doing the deed (e.g. consider a USB optical
drive; it is both detachable and removable).
To sum up, the net result of this change is that users of Nautilus
will get an Eject option and the eject icon in Nautilus' sidebar. Upon
the user pressing Eject in the UI we'll unmount all partitions as
usual. Then if the device is not removable, we'll invoke
DriveDetach(). That will make DeviceKit-disks send these two SCSI
commands
SYNCHRONIZE CACHE
STOP
and then we'll unbind e.g. the usb-storage driver from the USB
interface of the USB device. The net result is that the device appears
to be disconnected (ie. we get remove uevents for e.g. /dev/sdb[0..N]
and /dev/sdb) and also that the device powers down.
Right now DeviceKit-disks only supports DriveDetach() for USB devices
but should it gain support for doing the same thing for Firewire,
eSATA, whatever then we'll get that support for free too.
|
|
|
|
|
|
| |
This bug was introduced during the 2.25 cycle as part of supporting
multiple storage heads. Previously we didn't use basedir, now we
do. And we failed to check if the basedir is actually set.
|
|
|
|
|
|
| |
With the new polkit 1.0 version that gnome-disk-utility is now using,
authorizations are obtained out-of-band. So we don't need to handle it
here.
|
| |
|
|
|
|
|
|
|
|
| |
This should fix part of
https://bugzilla.redhat.com/show_bug.cgi?id=498649#c14
(the other part is fixed in the Fedora livecd scripts)
|
|
|
|
|
| |
This fixes a problem with Nautilus automounting newly created volumes
appearing as a result of formatting/partitioning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This mount option makes the vfat filesystem driver flush data more
often. As a consequence
1. users never get to see the gnome-disk-utility notification daemon
dialog just added
http://people.freedesktop.org/~david/gdu-unmount-busy-1.png
but that's useful for other filesystems as well.
2. The Nautilus copy dialog stays up until things are on the disk
We do this in gvfs rather than DeviceKit-disks because in some
scenarios 'flush' may be unwanted and there is currently no way to
turn it off (e.g. no 'noflush' or 'flush=0' option).
Ideally the kernel would get this kind of thing right by itself.
|
|
|
|
|
|
| |
This is to resolve bugs like
https://bugzilla.redhat.com/show_bug.cgi?id=495170
|
|
|
|
|
| |
Basically emit GVolumeMonitor::mount-pre-unmount on the volume monitor
and retry unmount operation a couple of times.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Show all entries from /etc/fstab for which
- the entry is user mountable
- the mount point is in /media or $HOME
- if it's a /dev file make sure it exists and is not handled
by DeviceKit-disks already
For example this /etc/fstab entry
"quad.local:/media/FusionMedia /media/FusionMedia nfs defaults,users 0 0"
makes Nautilus display this when unmounted
http://people.freedesktop.org/~david/gvfs-user-mountable-fstab-entries.png
and these GVolume and GMount objects to appear when mounted
Volume(0): FusionMedia
Type: GProxyVolume (GProxyVolumeMonitorGdu)
themed icons: [folder-remote] [folder]
can_mount=1
can_eject=0
Mount(0): FusionMedia -> file:///media/FusionMedia
Type: GProxyMount (GProxyVolumeMonitorGdu)
themed icons: [folder-remote] [folder]
can_unmount=1
can_eject=0
is_shadowed=0
This should resolve http://bugzilla.gnome.org/show_bug.cgi?id=536292
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a problem on some dmraid setups where we have drives
without any partitions (the dmraid boot scripts removes all partitions
(!)). See https://bugzilla.redhat.com/show_bug.cgi?id=495152 for more
details.
This fix is also consistent with the policy of ignoring drives where
all volumes are ignored. E.g. prior to this patch we didn't shown
neither sdb if sdb1 was a the only unrecognized partition on sdb.. so
if you delete sdb1, it would be natural to keep hiding sdb (which is
what this patch does).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a host of problems with e.g. Kindle or iPod devices
requiring to be "ejected" to display messages such as
"If you want to use your Kindle and continue charging, please eject
your Kindle from your computer."
to the user.
Previously we relied on HAL fdi files or similar to tag that such
devices needed to be ejectable. Now we just set everything as
ejectable.
For this to really work well the Nautilus patch in
http://bugzilla.gnome.org/show_bug.cgi?id=574067
needs to be reverted.
|
| |
|
|
|
|
|
|
|
|
| |
This fixes a problem where e.g. /dev/sdb1 a) is not referenced in
/etc/fstab; and b) is mounted in an ignored location e.g. /mnt/live.
Specifically this bug affects the Fedora Live CD, see
https://bugzilla.redhat.com/show_bug.cgi?id=495033 for details.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically we want to avoid automounting volumes from
1. drives on a 'virtual' or unset bus
2. volumes without a drive
This is to avoid interference with things like Fedora's livecd-tools
that use device-mapper to set up images. See
https://bugzilla.redhat.com/show_bug.cgi?id=494144 for more
background.
In the future we might want to relax 1. so automounting things like
Linux MD and LVM2 devices work.
|
|
|
|
|
|
|
|
| |
This fixes a typo - wrong assignment of device file when testing whether the
volume should be ignored or not. It led to empty GVolume list associated to a
GDrive and thus inability to mount anything via computer://
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Add the GNOME Disk Utility based volume monitor, see
http://bugzilla.gnome.org/show_bug.cgi?id=573826
http://mail.gnome.org/archives/gvfs-list/2009-March/msg00002.html
for details.
|
|
|
|
| |
Update old ignore files and add new ones as needed
|
|
|
|
|
|
|
|
|
|
|
| |
2009-04-11 Alexander Larsson <alexl@redhat.com>
* monitor/proxy/gproxyshadowmount.c:
(g_proxy_shadow_mount_remove):
Disconnect pre_unmount signal from right object.
svn path=/trunk/; revision=2371
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-31 Alexander Larsson <alexl@redhat.com>
* client/gdaemonmount.c:
(g_daemon_mount_guess_content_type):
* monitor/proxy/gproxymount.c:
(g_proxy_mount_guess_content_type):
Make sure async callbacks are sent in mainloop.
svn path=/trunk/; revision=2355
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-31 Alexander Larsson <alexl@redhat.com>
Bug 567635 – flickering context menu item
* monitor/proxy/gproxyshadowmount.c:
Make sure we return the shadow object as the source_object
when wrapping the shadowed mounts operations.
svn path=/trunk/; revision=2354
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-26 Carlos Garnacho <carlosg@gnome.org>
Bug 576083 – pre-unmount signals not being triggered
* monitor/hal/ghalmount.c (unmount_do) (unmount_do_cb): Emit
::mount-pre-unmount and wait 500msec before actually trying to
unmount.
* monitor/proxy/gproxyshadowmount.c (real_mount_pre_unmount_cb): Proxy
the shadowed mount pre-unmount signal.
* monitor/proxy/gproxyvolumemonitor.c (filter_function): GMount
doesn't have the ::pre-unmount signal yet, so don't emit it.
svn path=/trunk/; revision=2350
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-17 Alexander Larsson <alexl@redhat.com>
* monitor/proxy/gproxyshadowmount.c:
(g_proxy_shadow_mount_remove):
Don't unref the real mount directly when we're unshadowed, because
that means most functions in the shadow mount won't work in the
removed signal emissions.
This caused lots of spew in e.g. gvfs-mount -oi on unmount of
a shadowed mount.
svn path=/trunk/; revision=2339
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-17 Alexander Larsson <alexl@redhat.com>
Bug 575552 – icons for audio cds duplicated on the desktop after remounts
* monitor/proxy/gproxyvolumemonitor.c:
Dispose volumes when removed
* monitor/proxy/gproxyvolume.c:
When disposed, disconnect from union volume monitor so that we don't get
a mount_added for a later mount and create a shadow mount for that.
svn path=/trunk/; revision=2338
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-09 Alexander Larsson <alexl@redhat.com>
Bug 570888 – gvfs-gphoto2 mount 4 devices when pluging one camera
* monitor/gphoto2/ggphoto2volumemonitor.c:
(get_stores_for_camera):
Ignore stores that have 0 byte capability.
svn path=/trunk/; revision=2304
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-05 Alexander Larsson <alexl@redhat.com>
* monitor/hal/ghaldrive.c:
* monitor/hal/ghalmount.c:
* monitor/hal/ghalvolume.c:
* monitor/hal/ghalvolumemonitor.c:
Remove all locking (not needed since we're now
a single threaded process).
Don't emit signals in idle, thus risking callback
reordering. We don't need this anymore as it was
part of the locking structure.
This should fix the "No mount object for mounted
volume" error when mounting.
svn path=/trunk/; revision=2290
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-04 Alexander Larsson <alexl@redhat.com>
* monitor/proxy/gproxyvolumemonitor.c:
Break circular dependencies on dispose.
svn path=/trunk/; revision=2285
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-02 David Zeuthen <davidz@redhat.com>
Bug 551403 – Support Reading Volume Icon/Name Information
from .xdg-volume-info
* common/Makefile.am:
* common/gvfsmountinfo.[ch]: Move autorun file detection to common
library. Also add routines for detecting .xdg-volume-info files.
* monitor/hal/ghalmount.c: Use g_mount_info*() functions for
detecting autorun and .xdg-volume-info files.
svn path=/trunk/; revision=2276
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-02 Alexander Larsson <alexl@redhat.com>
Bug 545025 – gvfs doesnt use hal storage.icon.drive/volume properties
* monitor/hal/ghaldrive.c:
* monitor/hal/ghalmount.c:
Use storage.icon.drive and storage.icon.volume, not
info.desktop.icon as per the spec.
Patch from Karl Relton
svn path=/trunk/; revision=2270
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-02-26 David Zeuthen <davidz@redhat.com>
Lots of proxy monitor fixes.
Reviewed by: Alexander Larsson <alexl@redhat.com>
o add support for proxying GMountOperation to the remote volume
monitor process.
o add support for proxying GCancellable to the remote volume
monitor process.
o make each volume monitor process track callers and cancels
operations initiated by callers that disconnects from the bus
o makes the client side proxy monitor track the remote monitor. If
the monitor process disconnects, then all drives/volumes/mounts
are removed. If the monitor process reconnects, we reseed the
internal monitor and add drives/volumes/mounts.
o Each monitor process now uses ALLOW_REPLACEMENT when claiming a
name and also kills itself on NameLost (e.g. if it is
replaced). Coupled with the above disconnection/reconnection logic
it this makes it a lot more tolerable to hack on a remote volume
monitor. Simply just compile it, start it and the
existing (system-wide) copy will kill itself. And all the
clients (Nautilus, panel, drive applet, gvfsd-computer, etc.) will
reconnect and do the right thing.
o make the get_mount_for_mount_path() method on the class
GNativeVolumeMonitor actually work. It turns out that at least
gvfs-mount -u needs that.
o use /org/gtk/Private/RemoteVolumeMonitor instead of / as the
object name. Cf. the version D-Bus debacle on Lennart Poettering's
blog.
o make the proxy monitor client module resident
o For shadow mounts, redirect can_eject() and eject() to the
volume for the shadow mount. Without this patch eject on
e.g. cdda:// volumes won't work since cdda:// volumes are
GDaedmonMount and these don't implement eject.
* monitor/proxy/*.[ch]: See above.
svn path=/trunk/; revision=2253
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-02-20 David Zeuthen <davidz@redhat.com>
Make the gphoto2 backend work with buggy devices (such as the
iPhone) where the basedir of the store changes.
* daemon/gvfsbackendgphoto2.c: Revert the patch from #520123 that
removed the ignore_prefix handling. Change ensure_ignore_prefix()
to only use an ignore prefix if there is exactly one storage head.
* monitor/gphoto2/ggphoto2volumemonitor.c: Nuke orphan mount
handling since that is superseeded by shadow mounts. Also avoid
appending the store name if there is only one storage head.
* monitor/gphoto2/ggphoto2volume.[ch]: Rename foreign_mount_root
to activation_root since that is really what it is now. Also
fix a silly logical bug whereby music players (as reported by
HAL) weren't detected.
svn path=/trunk/; revision=2239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-12-09 Bastien Nocera <hadess@hadess.net>
* monitor/gphoto2/Makefile.am:
* monitor/gphoto2/ggphoto2volumemonitor.c (get_stores_for_camera),
(update_cameras): For each camera discovered, create shadow mounts
for each one of the top-level storage heads, makes each of the
device's stores appear separately
* daemon/gvfsbackendgphoto2.c (monitors_emit_internal),
(release_device), (split_filename), (file_get_info), (do_mount),
(do_open_for_read_real), (do_query_info), (try_query_info),
(do_enumerate), (try_enumerate), (do_make_directory),
(do_set_display_name), (do_delete), (do_create_internal),
(do_replace), (do_append_to), (do_move), (do_create_dir_monitor),
(do_create_file_monitor): Remove all the hacks to handle
a single storage head differently from multiple storage heads,
this makes photo directories detection and the likes work
for multiple storage-heads
(Closes: #520123)
svn path=/trunk/; revision=2126
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-12-01 Alexander Larsson <alexl@redhat.com>
* client/gdaemonmount.c:
* client/gdaemonvolumemonitor.c:
* monitor/proxy/Makefile.am:
* monitor/proxy/gproxydrive.c:
* monitor/proxy/gproxymount.c:
* monitor/proxy/gproxyvolume.c:
* monitor/proxy/gproxyvolume.h:
* monitor/proxy/gproxyvolumemonitor.c:
* monitor/proxy/gproxyvolumemonitor.h:
* monitor/proxy/remote-volume-monitor-module.c:
* monitor/proxy/gproxyshadowmount.[ch]:
Use the new support for shadow mounts instead
of g_volume_monitor_adopt_orphan_mount
Patch from David Zeuthen (#555332)
* programs/gvfs-mount.c:
Add support to monitor volume monitor events
svn path=/trunk/; revision=2119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-10-21 Alexander Larsson <alexl@redhat.com>
* configure.ac:
Require glib 2.19.1 for GIcon serialization support
* common/gvfsdaemonprotocol.c:
Use g_icon_to_string & co instead of home-brewed serialization
* monitor/proxy/gproxydrive.c:
* monitor/proxy/gproxymount.c:
* monitor/proxy/gproxyvolume.c:
* monitor/proxy/gproxyvolumemonitor.c:
* monitor/proxy/gproxyvolumemonitor.h:
* monitor/proxy/gvfsproxyvolumemonitordaemon.c:
Use g_icon_to_string & co instead of home-brewed serialization
svn path=/trunk/; revision=2069
|
|
|
|
|
|
|
|
|
|
|
| |
2008-09-29 David Zeuthen <davidz@redhat.com>
* monitor/proxy/gproxyvolume.c (mount_cb): Complete the mounting
operation in idle to ensure we've processed pending dbus messages
for creating the new mount object
svn path=/trunk/; revision=2037
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-09-29 David Zeuthen <davidz@redhat.com>
* monitor/hal/ghalvolume.c:
* monitor/hal/ghalvolumemonitor.[ch]:
Make sure we emit 'mount-added' when forcing an update for
completing a mount operation (#552168)
svn path=/trunk/; revision=2036
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-09-23 Alexander Larsson <alexl@redhat.com>
* monitor/proxy/gproxyvolumemonitor.[ch]:
* monitor/proxy/gproxyvolumemonitor.h:
* monitor/proxy/remote-volume-monitor-module.c:
Only call the IsSupported dbus call when the class
is actually needed instead of on gio init.
Don't integrate internal session bus with mainloop
during is_support code, as that is not necessary yet, and
it caused problem if done in a thread.
This fixes the trash crash issue in bug #547568.
2008-09-23 Alexander Larsson <alexl@redhat.com>
* client/Makefile.am:
* common/Makefile.am:
* common/gmountsource.c:
* common/gmounttracker.c:
* monitor/gphoto2/Makefile.am:
* monitor/hal/Makefile.am:
* monitor/proxy/Makefile.am:
Link all modules against the installed libgvfscommon instead
of duplicating the statically linked one. This is safe wrt
namespace conflicts, because the modules are opened RTLD_LOCAL
so the dependencies will not pollute the global namespace.
* client/gdaemonvfs.c:
Make the gvfsdbus module persistant. This means we will never
unload it, and thus not unload libgvfscommon which could
be problematic. This is not a huge problem, as:
+ The gio modules will not be loaded anyway unless you use gio
+ The gvfsdbus module will be persistent anyway as soon as
the app references the GVfs object, which likely all gio apps do
+ The module load order doesn't matter wrt unload order, because
all gio modules are loaded before any one is unloaded.
svn path=/trunk/; revision=2021
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-09-02 David Zeuthen <davidz@redhat.com>
* monitor/hal/ghaldrive.c: (g_hal_drive_eject_do):
* monitor/hal/ghalmount.c: (unmount_cb), (unmount_do),
(eject_wrapper_callback), (g_hal_mount_eject):
* monitor/proxy/gproxymount.c: (eject_wrapper_callback),
(g_proxy_mount_eject):
* monitor/proxy/gproxyvolume.c: (eject_wrapper_callback):
Remember to refcount objects (#546971).
svn path=/trunk/; revision=1931
|
|
|
|
|
|
|
|
|
|
| |
2008-09-02 David Zeuthen <davidz@redhat.com>
* monitor/hal/ghalvolume.c (format_size_for_display): Add docs
explaining why powers of 10 are used.
svn path=/trunk/; revision=1930
|