hal/hald hald.c,1.41,1.42

Danny Kukawka dkukawka at freedesktop.org
Wed Oct 26 11:51:09 PDT 2005


Update of /cvs/hal/hal/hald
In directory gabe:/tmp/cvs-serv11324/hald

Modified Files:
	hald.c 
Log Message:
2005-10-26  Danny Kukawka  <danny.kukawka at web.de>

        * hald/hald.c: (usage), (main): added --version command line option
        to print the PACKAGE_VERSION of HAL.



Index: hald.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- hald.c	26 Oct 2005 18:35:40 -0000	1.41
+++ hald.c	26 Oct 2005 18:51:06 -0000	1.42
@@ -217,6 +217,7 @@
 		 "        --retain-privileges  Run as root instead of normal user (calling of\n"
  		 "                             external scripts to modify fstab etc. will work)\n" 
 		 "        --help               Show this information and exit\n"
+		 "        --version            Output version information and exit"
 		 "\n"
 		 "The HAL daemon detects devices present in the system and provides the\n"
 		 "org.freedesktop.Hal service through the system-wide message bus provided\n"
@@ -439,6 +440,7 @@
 			{"use-syslog", 0, NULL, 0},
 			{"help", 0, NULL, 0},
 			{"retain-privileges", 0, NULL, 0},
+			{"version", 0, NULL, 0},
 			{NULL, 0, NULL, 0}
 		};
 
@@ -454,6 +456,9 @@
 			if (strcmp (opt, "help") == 0) {
 				usage ();
 				return 0;
+			} else if (strcmp (opt, "version") == 0) {
+				fprintf (stderr, "HAL package version: " PACKAGE_VERSION "\n");
+				return 0;
 			} else if (strcmp (opt, "daemon") == 0) {
 				if (strcmp ("yes", optarg) == 0) {
 					opt_become_daemon = TRUE;




More information about the hal-commit mailing list