hal/tools Makefile.am,1.6,1.7 fstab-sync.c,NONE,1.1

David Zeuthen david at freedesktop.org
Thu Jul 15 14:32:07 PDT 2004


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

Modified Files:
	Makefile.am 
Added Files:
	fstab-sync.c 
Log Message:
2004-07-15  David Zeuthen  <david at fubar.dk>

	Patch from Ray Strode <rstrode at redhat.com>

	* tools/Makefile.am: Add rules for building fstab-sync

	* tools/fstab-sync.c: New file



Index: Makefile.am
===================================================================
RCS file: /cvs/hal/hal/tools/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Makefile.am	1 Mar 2004 20:29:05 -0000	1.6
+++ Makefile.am	15 Jul 2004 21:32:05 -0000	1.7
@@ -10,6 +10,7 @@
 	@PACKAGE_CFLAGS@
 
 bin_PROGRAMS = lshal hal-get-property hal-set-property
+sbin_PROGRAMS = fstab-sync
 
 lshal_SOURCES = lshal.c
 lshal_LDADD = @PACKAGE_LIBS@ \
@@ -21,5 +22,8 @@
 hal_set_property_SOURCES = hal_set_property.c
 hal_set_property_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
 
+fstab_sync_SOURCES = fstab-sync.c
+fstab_sync_LDADD = -lpopt $(top_builddir)/libhal/libhal.la
+
 clean-local :
 	rm -f *~

--- NEW FILE: fstab-sync.c ---
/* Copyright 2004 Red Hat, Inc.
 *
 * This software may be freely redistributed under the terms of the GNU
 * Lesser General Public license.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/* This program serves two major purposes:
 *    1) Update the fs table in response to HAL events
 *    2) Possibly mount the devices that were added in response to 1)
 *       (not useful if a volume manager is installed)
 *
 * Additionally, this program offers a third option of removing
 * any trace of its previous actions from the fs table.
 *
 * Because it is possible that this program could be invoked multiple
[...1597 lines suppressed...]
      hal_context = hal_initialize (&halFunctions, 0);

      if (udi_to_add)
        retval = !add_udi (udi_to_add, should_mount_device);

      if (udi_to_remove)
        retval |= !remove_udi (udi_to_remove);

      hal_shutdown (hal_context);
    }
  else if (should_clean)
    retval = clean ();
  else
    {
      poptPrintHelp (popt_context, stderr, 0);
      return 1;
    }

  return retval;
}




More information about the hal-commit mailing list