diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-06-30 11:53:15 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-06-30 11:53:15 +0000 |
commit | 30879db08edddc827d9dae05aec39061bc64437e (patch) | |
tree | a54195b6e067c9e9fb1318bee5cbad1eae76cd7b /lib | |
parent | a03d260fe420c4fc82375f7dd6eb1db6a86a065a (diff) |
Add extra debugging to help find out why getopt is behaving weirdly
on debian etch
(http://lists.warhead.org.uk/pipermail/boxbackup/2007-June/003603.html)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/server/Daemon.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/server/Daemon.cpp b/lib/server/Daemon.cpp index 37698101..66b317d5 100644 --- a/lib/server/Daemon.cpp +++ b/lib/server/Daemon.cpp @@ -124,6 +124,12 @@ int Daemon::Main(const char *DefaultConfigFile, int argc, const char *argv[]) while((c = getopt(argc, (char * const *)argv, "c:DFqvVt:Tk")) != -1) { + BOX_TRACE("getopt: returned '" << c << "'"); + BOX_TRACE("getopt: optind = " << optind); + BOX_TRACE("getopt: optopt = " << optopt); + BOX_TRACE("getopt: optarg = " << optarg); + BOX_TRACE("getopt: argv[optind] = " << argv[optind]); + switch(c) { case 'c': @@ -212,6 +218,8 @@ int Daemon::Main(const char *DefaultConfigFile, int argc, const char *argv[]) } } + BOX_TRACE("getopt: returned " << (int)c << ", finished."); + if (argc > optind && !haveConfigFile) { mConfigFileName = argv[optind]; optind++; |