hal/tools fstab-sync.c,1.7,1.8

David Zeuthen david at freedesktop.org
Mon Aug 16 11:52:59 PDT 2004


Update of /cvs/hal/hal/tools
In directory pdx:/tmp/cvs-serv7577/tools

Modified Files:
	fstab-sync.c 
Log Message:
2004-08-16  David Zeuthen  <david at fubar.dk>

	* configure.in: Add the --enable-fstab-op to specify whether we
	want to use a keyword (currently kudzu) when adding entries
	to the fstab. Default is off

	* hald/linux/block_class_device.c:
	(block_class_visit): Only return the HalDevice if the parent exists
	(detect_media): Print out debug statement when we forcibly probe
	for media
	(block_class_pre_process): Detect the ide-cs driver by looking at
	the sysfs path (!) and set the media_check_enable to FALSE.  Only
	do volume_id and drive_id probing if storage.media_check_enabled
	is TRUE. Sets the volume.fstype to 'vfat,msdos,auto' in this case.
	Fixes issues with the ide-cs driver
	(block_class_in_gdl): Add a comment about how we could defer
	the check for non-partitioned media via a timeout
	(deferred_check_for_non_partition_media): The function to check
	for media; not currently used
	(mtab_handle_storage): Use detect_media() to add the new child
	when a non-partition volume we didn't know about was mounted
	(mtab_handle_volume): Remove non partitioned media on drives
	that can't be polled when it's unmounted.
	
	* hald/linux/bus_device.c:
	(bus_device_visit): Only return the HalDevice if the parent exists

	* hald/linux/class_device.c:
	(class_device_visit): Only return the HalDevice if the parent exists
	(class_device_got_parent_device): Print out the sysfs path instead
	of the HAL UDI
	
	* hald/linux/ide_bus_device.c:
	(ide_device_accept): New function; currently the same as the super
	class but useful for testing
	
	* hald/linux/ide_host_bus_device.c:
	(ide_host_device_accept): Don't pickup toplevel ide_host objects
	cause they're not hotplugged anyway (thus no way to remove them)
	
	* tools/fstab-sync.c: 
	(volume_new): Also check if the volume.fstype is empty



Index: fstab-sync.c
===================================================================
RCS file: /cvs/hal/hal/tools/fstab-sync.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- fstab-sync.c	13 Aug 2004 12:53:16 -0000	1.7
+++ fstab-sync.c	16 Aug 2004 18:52:39 -0000	1.8
@@ -28,6 +28,10 @@
  * changed, then it simply starts over, recopying /etc/fstab and trying again.
  */
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #define _GNU_SOURCE
 #include <assert.h>
 #include <ctype.h>
@@ -1013,7 +1017,7 @@
   volume_determine_device_type (volume);
 
   volume->fs_type = get_hal_string_property (udi, "volume.fstype");
-  if (volume->fs_type == NULL)
+  if (volume->fs_type == NULL || strlen (volume->fs_type) == 0)
     {
       volume->fs_type = strdup ("auto");
     }




More information about the hal-commit mailing list