diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-01-11 09:17:28 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-01-11 09:17:28 +0000 |
commit | 64e052d5b43bcb033187e46aaafea4f867e10a75 (patch) | |
tree | a9dd2fb52294968fe65b7c4f918895a0d220631c /daemon/gvfsjobunmount.c | |
parent | ed7cfa1b785fd70da0945518878197d61897e6b1 (diff) | |
download | gvfs-64e052d5b43bcb033187e46aaafea4f867e10a75.tar.gz |
Implement unmount_mountable and eject_mountable on client side.
2008-01-11 Alexander Larsson <alexl@redhat.com>
* client/gdaemonfile.c:
* common/gvfsdaemonprotocol.h:
Implement unmount_mountable and eject_mountable
on client side.
* common/gmountoperationdbus.c:
Fix warnings
* daemon/gvfsbackend.[ch]:
* daemon/gvfsjobunmountmountable.[ch]:
Add unmount_mountable and eject_mountable in daemon.
* daemon/gvfsbackendcomputer.c:
Implement unmount_mountable and eject_mountable
* daemon/gvfsbackendlocaltest.c:
Update to latest API
* daemon/gvfsbackendsftp.c:
Fix indentation
* daemon/gvfsjobunmount.c:
Always allow unmount if unmount is not
implemented.
svn path=/trunk/; revision=1093
Diffstat (limited to 'daemon/gvfsjobunmount.c')
-rw-r--r-- | daemon/gvfsjobunmount.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c index a23b9be8..4d471bb7 100644 --- a/daemon/gvfsjobunmount.c +++ b/daemon/gvfsjobunmount.c @@ -100,13 +100,6 @@ run (GVfsJob *job) GVfsJobUnmount *op_job = G_VFS_JOB_UNMOUNT (job); GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); - if (class->unmount == NULL) - { - g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, - _("Operation not supported by backend")); - return; - } - class->unmount (op_job->backend, op_job); } @@ -118,7 +111,16 @@ try (GVfsJob *job) GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); if (class->try_unmount == NULL) - return FALSE; + { + if (class->unmount == NULL) + { + /* If unmount is not implemented we always succeed */ + g_vfs_job_succeeded (G_VFS_JOB (job)); + return TRUE; + } + + return FALSE; + } return class->try_unmount (op_job->backend, op_job); |