hal/tools hal-system-storage-mount,1.11,1.12
David Zeuthen
david at freedesktop.org
Sun Jan 15 08:54:08 PST 2006
Update of /cvs/hal/hal/tools
In directory gabe:/tmp/cvs-serv31515/tools
Modified Files:
hal-system-storage-mount
Log Message:
2006-01-15 David Zeuthen <davidz at redhat.com>
* tools/hal-system-storage-mount: Respect volume.ignore and refuse to
mount if set to TRUE
* libhal-storage/libhal-storage.h: Export libhal_volume_should_ignore
as a public method (API addition, no breakage)
* libhal-storage/libhal-storage.c (libhal_volume_should_ignore): New
function.
(libhal_volume_from_udi): Set vol->ignore_volume from property
* fdi/policy/10osvendor/20-storage-methods.fdi: Introduce volume.ignore
as a way for vendors and admins to signify a volume should be ignored.
* fdi/information/10freedesktop/10-usb-card-readers.fdi: Add an entry
for my Firewire card reader (yes, it works perfectly on my PB 12" G4
running Fedora Rawhide - it's fast too.. vroom vroom).
Index: hal-system-storage-mount
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-storage-mount,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- hal-system-storage-mount 11 Jan 2006 17:00:21 -0000 1.11
+++ hal-system-storage-mount 15 Jan 2006 16:54:06 -0000 1.12
@@ -28,6 +28,13 @@
exit 1
fi
+# check if device should be ignored
+if [ "$HAL_PROP_VOLUME_IGNORE" = "true" ]; then
+ echo "org.freedesktop.Hal.Device.Volume.PermissionDenied" >&2
+ echo "Device has volume.ignore set to TRUE. Refusing to mount." >&2
+ exit 1
+fi
+
# read parameters
# "MyDisk\n"
# "fuse\n"
More information about the hal-commit
mailing list