[PATCH] Also fail mounting when no host was passed



Which would happen when passing no options to the daemon.
---
 daemon/gvfsbackendafc.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index 1357b4c..5afe15c 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -188,8 +188,12 @@ static void g_vfs_backend_afc_mount(GVfsBackend *backend, GVfsJobMount *job,
     self->connected = FALSE;
 
     str = g_mount_spec_get(spec, "host");
-    if (G_UNLIKELY(str == NULL))
+    if (G_UNLIKELY(str == NULL)) {
+        g_vfs_job_failed (G_VFS_JOB (job),
+                          G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+                          _("Invalid mount spec"));
         return;
+    }
     if (G_UNLIKELY(sscanf(str, "%40s", &self->uuid)
                 < 1)) {
         g_vfs_job_failed(G_VFS_JOB(job), G_IO_ERROR, G_IO_ERROR_FAILED,
-- 
1.6.2.5


--=-aVtaZT31Mufg9rvC5fAY
Content-Disposition: attachment; filename="hal-ipod-touch-hotplug-log.txt"
Content-Type: text/plain; name="hal-ipod-touch-hotplug-log.txt"; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

*** 17:33:10.020: lshal: device_added, udi='/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622'
  info.bus = 'usb_device'  (string)
  info.linux.driver = 'usb'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_58f_6254_noserial'  (string)
  info.product = 'iPod'  (string)
  info.subsystem = 'usb_device'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  info.vendor = 'Apple, Inc.'  (string)
  linux.device_file = '/dev/bus/usb/001/010'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'usb'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4'  (string)
  usb_device.bus_number = 1  (0x1)  (int)
  usb_device.can_wake_up = false  (bool)
  usb_device.configuration = 'PTP + Apple Mobile Device'  (string)
  usb_device.configuration_value = 3  (0x3)  (int)
  usb_device.device_class = 0  (0x0)  (int)
  usb_device.device_protocol = 0  (0x0)  (int)
  usb_device.device_revision_bcd = 1  (0x1)  (int)
  usb_device.device_subclass = 0  (0x0)  (int)
  usb_device.is_self_powered = true  (bool)
  usb_device.linux.device_number = 10  (0xa)  (int)
  usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4'  (string)
  usb_device.max_power = 500  (0x1f4)  (int)
  usb_device.num_configurations = 3  (0x3)  (int)
  usb_device.num_interfaces = 2  (0x2)  (int)
  usb_device.num_ports = 0  (0x0)  (int)
  usb_device.product = 'iPod'  (string)
  usb_device.product_id = 4755  (0x1293)  (int)
  usb_device.serial = '8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  usb_device.speed = 480.0 (480) (double)
  usb_device.vendor = 'Apple, Inc.'  (string)
  usb_device.vendor_id = 1452  (0x5ac)  (int)
  usb_device.version = 2.0 (2) (double)
*** 17:33:10.033: lshal: device_added, udi='/org/freedesktop/Hal/devices/usb_device_ffffffff_ffffffff_noserial'
  info.bus = 'usb'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  info.product = 'USB Interface'  (string)
  info.subsystem = 'usb'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_ffffffff_ffffffff_noserial'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'usb'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:1.0'  (string)
  usb.bus_number = 1  (0x1)  (int)
  usb.can_wake_up = false  (bool)
  usb.configuration = 'PTP + Apple Mobile Device'  (string)
  usb.configuration_value = 3  (0x3)  (int)
  usb.device_class = 0  (0x0)  (int)
  usb.device_protocol = 0  (0x0)  (int)
  usb.device_revision_bcd = 1  (0x1)  (int)
  usb.device_subclass = 0  (0x0)  (int)
  usb.is_self_powered = true  (bool)
  usb.linux.device_number = 10  (0xa)  (int)
  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:1.0'  (string)
  usb.max_power = 500  (0x1f4)  (int)
  usb.num_configurations = 3  (0x3)  (int)
  usb.num_interfaces = 2  (0x2)  (int)
  usb.num_ports = 0  (0x0)  (int)
  usb.product = 'USB Interface'  (string)
  usb.product_id = 4755  (0x1293)  (int)
  usb.serial = '8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  usb.speed = 480.0 (480) (double)
  usb.vendor = 'Apple, Inc.'  (string)
  usb.vendor_id = 1452  (0x5ac)  (int)
  usb.version = 2.0 (2) (double)
*** 17:33:10.109: lshal: device_removed, udi='/org/freedesktop/Hal/devices/usb_device_ffffffff_ffffffff_noserial'
*** 17:33:10.192: lshal: device_added, udi='/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if0'
  access_control.file = '/dev/bus/usb/001/010'  (string)
  access_control.type = 'camera'  (string)
  camera.access_method = 'ptp'  (string)
  camera.libgphoto2.name = 'USB PTP Class Camera'  (string)
  camera.libgphoto2.support = true  (bool)
  info.bus = 'usb'  (string)
  info.callouts.add = {'hal-acl-tool --add-device'} (string list)
  info.callouts.remove = {'hal-acl-tool --remove-device'} (string list)
  info.capabilities = {'camera', 'camera', 'camera', 'access_control'} (string list)
  info.category = 'camera'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  info.product = 'USB Imaging Interface'  (string)
  info.subsystem = 'usb'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if0'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'usb'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:3.0'  (string)
  usb.bus_number = 1  (0x1)  (int)
  usb.can_wake_up = false  (bool)
  usb.configuration = 'PTP + Apple Mobile Device'  (string)
  usb.configuration_value = 3  (0x3)  (int)
  usb.device_class = 0  (0x0)  (int)
  usb.device_protocol = 0  (0x0)  (int)
  usb.device_revision_bcd = 1  (0x1)  (int)
  usb.device_subclass = 0  (0x0)  (int)
  usb.interface.class = 6  (0x6)  (int)
  usb.interface.number = 0  (0x0)  (int)
  usb.interface.protocol = 1  (0x1)  (int)
  usb.interface.subclass = 1  (0x1)  (int)
  usb.is_self_powered = true  (bool)
  usb.linux.device_number = 10  (0xa)  (int)
  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:3.0'  (string)
  usb.max_power = 500  (0x1f4)  (int)
  usb.num_configurations = 3  (0x3)  (int)
  usb.num_interfaces = 2  (0x2)  (int)
  usb.num_ports = 0  (0x0)  (int)
  usb.product = 'USB Imaging Interface'  (string)
  usb.product_id = 4755  (0x1293)  (int)
  usb.serial = '8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  usb.speed = 480.0 (480) (double)
  usb.vendor = 'Apple, Inc.'  (string)
  usb.vendor_id = 1452  (0x5ac)  (int)
  usb.version = 2.0 (2) (double)
*** 17:33:10.290: lshal: device_removed, udi='/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if0'
*** 17:33:10.330: lshal: device_added, udi='/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if1'
  access_control.file = '/dev/bus/usb/001/010'  (string)
  access_control.type = 'camera'  (string)
  camera.access_method = 'ptp'  (string)
  camera.libgphoto2.name = 'Apple iPod Touch (PTP mode)'  (string)
  camera.libgphoto2.support = true  (bool)
  info.bus = 'usb'  (string)
  info.callouts.add = {'hal-acl-tool --add-device'} (string list)
  info.callouts.remove = {'hal-acl-tool --remove-device'} (string list)
  info.capabilities = {'camera', 'afc', 'access_control'} (string list)
  info.category = 'camera'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  info.product = 'USB Vendor Specific Interface'  (string)
  info.subsystem = 'usb'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if1'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'usb'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:3.1'  (string)
  usb.bus_number = 1  (0x1)  (int)
  usb.can_wake_up = false  (bool)
  usb.configuration = 'PTP + Apple Mobile Device'  (string)
  usb.configuration_value = 3  (0x3)  (int)
  usb.device_class = 0  (0x0)  (int)
  usb.device_protocol = 0  (0x0)  (int)
  usb.device_revision_bcd = 1  (0x1)  (int)
  usb.device_subclass = 0  (0x0)  (int)
  usb.interface.class = 255  (0xff)  (int)
  usb.interface.number = 1  (0x1)  (int)
  usb.interface.protocol = 2  (0x2)  (int)
  usb.interface.subclass = 254  (0xfe)  (int)
  usb.is_self_powered = true  (bool)
  usb.linux.device_number = 10  (0xa)  (int)
  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:3.1'  (string)
  usb.max_power = 500  (0x1f4)  (int)
  usb.num_configurations = 3  (0x3)  (int)
  usb.num_interfaces = 2  (0x2)  (int)
  usb.num_ports = 0  (0x0)  (int)
  usb.product = 'USB Vendor Specific Interface'  (string)
  usb.product_id = 4755  (0x1293)  (int)
  usb.serial = '8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  usb.speed = 480.0 (480) (double)
  usb.vendor = 'Apple, Inc.'  (string)
  usb.vendor_id = 1452  (0x5ac)  (int)
  usb.version = 2.0 (2) (double)
*** 17:33:10.444: lshal: device_added, udi='/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if0'
  access_control.file = '/dev/bus/usb/001/010'  (string)
  access_control.type = 'camera'  (string)
  camera.access_method = 'ptp'  (string)
  camera.libgphoto2.name = 'USB PTP Class Camera'  (string)
  camera.libgphoto2.support = true  (bool)
  info.bus = 'usb'  (string)
  info.callouts.add = {'hal-acl-tool --add-device'} (string list)
  info.callouts.remove = {'hal-acl-tool --remove-device'} (string list)
  info.capabilities = {'camera', 'camera', 'camera', 'access_control'} (string list)
  info.category = 'camera'  (string)
  info.linux.driver = 'usbfs'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  info.product = 'USB Imaging Interface'  (string)
  info.subsystem = 'usb'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if0'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'usb'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:3.0'  (string)
  usb.bus_number = 1  (0x1)  (int)
  usb.can_wake_up = false  (bool)
  usb.configuration = 'PTP + Apple Mobile Device'  (string)
  usb.configuration_value = 3  (0x3)  (int)
  usb.device_class = 0  (0x0)  (int)
  usb.device_protocol = 0  (0x0)  (int)
  usb.device_revision_bcd = 1  (0x1)  (int)
  usb.device_subclass = 0  (0x0)  (int)
  usb.interface.class = 6  (0x6)  (int)
  usb.interface.number = 0  (0x0)  (int)
  usb.interface.protocol = 1  (0x1)  (int)
  usb.interface.subclass = 1  (0x1)  (int)
  usb.is_self_powered = true  (bool)
  usb.linux.device_number = 10  (0xa)  (int)
  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:3.0'  (string)
  usb.max_power = 500  (0x1f4)  (int)
  usb.num_configurations = 3  (0x3)  (int)
  usb.num_interfaces = 2  (0x2)  (int)
  usb.num_ports = 0  (0x0)  (int)
  usb.product = 'USB Imaging Interface'  (string)
  usb.product_id = 4755  (0x1293)  (int)
  usb.serial = '8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  usb.speed = 480.0 (480) (double)
  usb.vendor = 'Apple, Inc.'  (string)
  usb.vendor_id = 1452  (0x5ac)  (int)
  usb.version = 2.0 (2) (double)
*** 17:33:10.452: lshal: property_modified, udi=/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if0, key=info.linux.driver
           is_removed=false, is_added=true
*** new value: 'usbfs'  (string)

*** 17:33:10.457: lshal: device_removed, udi='/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if1'
*** 17:33:10.485: lshal: device_added, udi='/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if1'
  access_control.file = '/dev/bus/usb/001/010'  (string)
  access_control.type = 'camera'  (string)
  camera.access_method = 'ptp'  (string)
  camera.libgphoto2.name = 'Apple iPod Touch (PTP mode)'  (string)
  camera.libgphoto2.support = true  (bool)
  info.bus = 'usb'  (string)
  info.callouts.add = {'hal-acl-tool --add-device'} (string list)
  info.callouts.remove = {'hal-acl-tool --remove-device'} (string list)
  info.capabilities = {'camera', 'afc', 'access_control'} (string list)
  info.category = 'camera'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  info.product = 'USB Vendor Specific Interface'  (string)
  info.subsystem = 'usb'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_1293_8b4ef32f14e756b7e0c838b519e604de6753c622_if1'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'usb'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:3.1'  (string)
  usb.bus_number = 1  (0x1)  (int)
  usb.can_wake_up = false  (bool)
  usb.configuration = 'PTP + Apple Mobile Device'  (string)
  usb.configuration_value = 3  (0x3)  (int)
  usb.device_class = 0  (0x0)  (int)
  usb.device_protocol = 0  (0x0)  (int)
  usb.device_revision_bcd = 1  (0x1)  (int)
  usb.device_subclass = 0  (0x0)  (int)
  usb.interface.class = 255  (0xff)  (int)
  usb.interface.number = 1  (0x1)  (int)
  usb.interface.protocol = 2  (0x2)  (int)
  usb.interface.subclass = 254  (0xfe)  (int)
  usb.is_self_powered = true  (bool)
  usb.linux.device_number = 10  (0xa)  (int)
  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7.4/1-7.4:3.1'  (string)
  usb.max_power = 500  (0x1f4)  (int)
  usb.num_configurations = 3  (0x3)  (int)
  usb.num_interfaces = 2  (0x2)  (int)
  usb.num_ports = 0  (0x0)  (int)
  usb.product = 'USB Vendor Specific Interface'  (string)
  usb.product_id = 4755  (0x1293)  (int)
  usb.serial = '8b4ef32f14e756b7e0c838b519e604de6753c622'  (string)
  usb.speed = 480.0 (480) (double)
  usb.vendor = 'Apple, Inc.'  (string)
  usb.vendor_id = 1452  (0x5ac)  (int)
  usb.version = 2.0 (2) (double)


--=-aVtaZT31Mufg9rvC5fAY--



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]