summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-09-23 13:07:46 +0200
committerAlexander Larsson <alexl@redhat.com>2009-09-23 13:07:46 +0200
commit0285e9ede48ff83aead882401e36e9d7ae25746f (patch)
treeff103efb620b4761540796eba8a58bb9e7d0d962 /monitor
parent24041285e7392f5c83c8b98a017181983233d411 (diff)
downloadgvfs-0285e9ede48ff83aead882401e36e9d7ae25746f.tar.gz
FreeBSD support for gphoto2 backend
Here is a patch from Aurélien Jarno to enable the gphoto2 backend on FreeBSD and GNU/kFreeBSD.
Diffstat (limited to 'monitor')
-rw-r--r--monitor/gphoto2/ggphoto2volumemonitor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/monitor/gphoto2/ggphoto2volumemonitor.c b/monitor/gphoto2/ggphoto2volumemonitor.c
index a9f91227..8b870747 100644
--- a/monitor/gphoto2/ggphoto2volumemonitor.c
+++ b/monitor/gphoto2/ggphoto2volumemonitor.c
@@ -763,7 +763,13 @@ update_cameras (GGPhoto2VolumeMonitor *monitor,
continue;
usb_bus_num = hal_device_get_property_int (d, "usb.bus_number");
+#if defined(__linux__)
usb_device_num = hal_device_get_property_int (d, "usb.linux.device_number");
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ usb_device_num = hal_device_get_property_int (d, "freebsd.unit");
+#else
+# error "Need OS specific tweaks"
+#endif
store_heads = get_stores_for_camera (usb_bus_num, usb_device_num);
num_store_heads = g_list_length (store_heads);