Wed Apr 4 10:30:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>

* configure.in, qemud/Makefile.am: Set QEMUD_PID_FILE macro
	  correctly (expand ${prefix} in Makefile).
	* qemud/qemud.c: Add command line help.
	* ChangeLog: Remove a CVS '>>>>' conflict line which had
	  been committed inadvertently.
This commit is contained in:
Richard W.M. Jones 2007-04-04 09:32:00 +00:00
parent b5d6258530
commit ad8bef84d1
4 changed files with 53 additions and 6 deletions

View File

@ -1,3 +1,11 @@
Wed Apr 4 10:30:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, qemud/Makefile.am: Set QEMUD_PID_FILE macro
correctly (expand ${prefix} in Makefile).
* qemud/qemud.c: Add command line help.
* ChangeLog: Remove a CVS '>>>>' conflict line which had
been committed inadvertently.
Mon Apr 2 13:54:17 CEST 2007 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: applied patch from Atsushi SAKAI to clarify
@ -56,7 +64,6 @@ Tue Mar 27 10:39:00 EDT 2007 Daniel P. Berrange <berrange@redhat.com>
* tests/xencapsdata/*: Added data files for Xen capabilities tests
* configure.ac, tests/Makefile.am: Added tests/xencapsdata/ directory
>>>>>>> 1.489
Tue Mar 27 11:26:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/qemud.c: If using FORTIFY_SOURCE, remove warning

View File

@ -105,7 +105,7 @@ elif test "x$with_qemud_pid_file" == "xnone" ; then
else
QEMUD_PID_FILE="$with_qemud_pid_file"
fi
AC_DEFINE_UNQUOTED(QEMUD_PID_FILE, "$QEMUD_PID_FILE", [PID file path for qemud])
AC_SUBST(QEMUD_PID_FILE)
AC_MSG_RESULT($QEMUD_PID_FILE)
dnl

View File

@ -17,7 +17,8 @@ libvirt_qemud_SOURCES = qemud.c internal.h protocol.h \
libvirt_qemud_CFLAGS = \
-I$(top_srcdir)/include -I$(top_builddir)/include $(LIBXML_CFLAGS) \
$(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \
-DSYSCONF_DIR="\"$(sysconfdir)\""
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
libvirt_qemud_LDFLAGS = $(LIBXML_LIBS) $(SYSFS_LIBS)
libvirt_qemud_DEPENDENCIES =
libvirt_qemud_LDADD =

View File

@ -1744,6 +1744,44 @@ static void qemudCleanup(struct qemud_server *server) {
free(server);
}
/* Print command-line usage. */
static void
usage (const char *argv0)
{
fprintf (stderr,
"\n"
"Usage:\n"
" %s [options]\n"
"\n"
"Options:\n"
" -v | --verbose Verbose messages.\n"
" -d | --daemon Run as a daemon & write PID file.\n"
" -s | --system Run as system daemon.\n"
" -t | --timeout <secs> Exit after timeout period.\n"
" -p | --pid-file <file> Change name of PID file.\n"
"\n"
"Notes:\n"
"\n"
"For '--system' option you must be running this daemon as root.\n"
"\n"
"The '--timeout' applies only when the daemon is not servicing\n"
"clients.\n"
"\n"
"Default paths:\n"
"\n"
" Sockets (in system mode):\n"
" " LOCAL_STATE_DIR "/run/libvirt/qemud-sock\n"
" " LOCAL_STATE_DIR "/run/libvirt/qemud-sock-ro\n"
"\n"
" Sockets (not in system mode):\n"
" $HOME/.libvirt/qemud-sock (in Unix abstract namespace)\n"
"\n"
" PID file (unless overridden by --pid-file):\n"
" " QEMUD_PID_FILE "\n"
"\n",
argv0);
}
#define MAX_LISTEN 5
int main(int argc, char **argv) {
int sys = 0;
@ -1758,8 +1796,9 @@ int main(int argc, char **argv) {
{ "verbose", no_argument, &verbose, 1},
{ "daemon", no_argument, &godaemon, 1},
{ "system", no_argument, &sys, 1},
{ "timeout", required_argument, 0, 't'},
{ "pid-file", required_argument, 0, 'p'},
{ "timeout", required_argument, NULL, 't'},
{ "pid-file", required_argument, NULL, 'p'},
{ "help", no_argument, NULL, '?' },
{0, 0, 0, 0}
};
@ -1801,8 +1840,8 @@ int main(int argc, char **argv) {
break;
case '?':
usage (argv[0]);
return 2;
break;
default:
abort();