Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-10-10 19:48:54 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-10-10 19:48:54 +0400
commit9e9bc3a4e4d07db9f6a1c896c02ac10efb0c66b3 (patch)
treecff0301f526b1f5b260ff408304f993cc394a8f4 /winsup/cygserver
parentf213601cda7ed71ea2cd5a65217da7c3c8249bdb (diff)
* cygserver.cc (print_usage): Align output to utilities in utils
directory. (print_version): Ditto.
Diffstat (limited to 'winsup/cygserver')
-rw-r--r--winsup/cygserver/ChangeLog6
-rw-r--r--winsup/cygserver/cygserver.cc49
2 files changed, 29 insertions, 26 deletions
diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog
index 854c8c069..47ad90900 100644
--- a/winsup/cygserver/ChangeLog
+++ b/winsup/cygserver/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygserver.cc (print_usage): Align output to utilities in utils
+ directory.
+ (print_version): Ditto.
+
2011-08-18 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* sysv_shm.cc (ACCESSPERMS): Remove to fix redefined warning, as
diff --git a/winsup/cygserver/cygserver.cc b/winsup/cygserver/cygserver.cc
index 262734f95..c58b236fa 100644
--- a/winsup/cygserver/cygserver.cc
+++ b/winsup/cygserver/cygserver.cc
@@ -1,6 +1,6 @@
/* cygserver.cc
- Copyright 2001, 2002, 2003, 2004, 2005, 2007 Red Hat Inc.
+ Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2011 Red Hat Inc.
Written by Egor Duda <deo@logos-m.ru>
@@ -449,16 +449,22 @@ static void
print_usage (const char *const pgm)
{
log (LOG_NOTICE, "Usage: %s [OPTIONS]\n"
+"\n"
+"Cygwin background service daemon\n"
+"\n"
"Configuration option:\n"
+"\n"
" -f, --config-file <file> Use <file> as config file. Default is\n"
" " DEF_CONFIG_FILE "\n"
"\n"
"Performance options:\n"
+"\n"
" -c, --cleanup-threads <num> Number of cleanup threads to use.\n"
" -p, --process-cache <num> Size of process cache.\n"
" -r, --request-threads <num> Number of request threads to use.\n"
"\n"
"Logging options:\n"
+"\n"
" -d, --debug Log debug messages to stderr.\n"
" -e, --stderr Log to stderr (default if stderr is a tty).\n"
" -E, --no-stderr Don't log to stderr (see -y, -Y options).\n"
@@ -467,14 +473,16 @@ print_usage (const char *const pgm)
" -Y, --no-syslog Don't log to syslog (See -e, -E options).\n"
"\n"
"Support options:\n"
+"\n"
" -m, --no-sharedmem Don't start XSI Shared Memory support.\n"
" -q, --no-msgqueues Don't start XSI Message Queue support.\n"
" -s, --no-semaphores Don't start XSI Semaphore support.\n"
"\n"
"Miscellaneous:\n"
+"\n"
" -S, --shutdown Shutdown the daemon.\n"
" -h, --help Output usage information and exit.\n"
-" -v, --version Output version information and exit."
+" -V, --version Output version information and exit.\n"
, pgm);
}
@@ -485,27 +493,16 @@ print_usage (const char *const pgm)
static void
print_version ()
{
- char buf[200];
- snprintf (buf, sizeof (buf), "%d.%d.%d(%d.%d/%d/%d)-(%d.%d.%d.%d) %s",
- cygwin_version.dll_major / 1000,
- cygwin_version.dll_major % 1000,
- cygwin_version.dll_minor,
- cygwin_version.api_major,
- cygwin_version.api_minor,
- cygwin_version.shared_data,
- CYGWIN_SERVER_VERSION_MAJOR,
- CYGWIN_SERVER_VERSION_API,
- CYGWIN_SERVER_VERSION_MINOR,
- CYGWIN_SERVER_VERSION_PATCH,
- cygwin_version.mount_registry,
- cygwin_version.dll_build_date);
-
- log (LOG_INFO, "(cygwin) %s\n"
- "API version %s\n"
- "Copyright 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.\n"
- "Compiled on %s\n"
- "Default configuration file is %s",
- SERVER_VERSION, buf, __DATE__, DEF_CONFIG_FILE);
+ log (LOG_INFO,
+ "cygserver (cygwin) %d.%d.%d\n"
+ "Cygwin background service daemon\n"
+ "Copyright (C) 2001 - %s Red Hat, Inc.\n"
+ "This is free software; see the source for copying conditions. There is NO\n"
+ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",
+ CYGWIN_VERSION_DLL_MAJOR / 1000,
+ CYGWIN_VERSION_DLL_MAJOR % 1000,
+ CYGWIN_VERSION_DLL_MINOR,
+ strrchr (__DATE__, ' ') + 1);
}
/*
@@ -529,13 +526,13 @@ main (const int argc, char *argv[])
{"request-threads", required_argument, NULL, 'r'},
{"no-semaphores", no_argument, NULL, 's'},
{"shutdown", no_argument, NULL, 'S'},
- {"version", no_argument, NULL, 'v'},
+ {"version", no_argument, NULL, 'V'},
{"syslog", no_argument, NULL, 'y'},
{"no-syslog", no_argument, NULL, 'Y'},
{0, no_argument, NULL, 0}
};
- const char opts[] = "c:deEf:hl:mp:qr:sSvyY";
+ const char opts[] = "c:deEf:hl:mp:qr:sSVyY";
long cleanup_threads = 0;
long request_threads = 0;
@@ -630,7 +627,7 @@ main (const int argc, char *argv[])
shutdown = true;
break;
- case 'v':
+ case 'V':
print_version ();
return 0;