diff options
author | Pavel Březina <pbrezina@redhat.com> | 2011-08-29 10:32:03 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-09-08 15:29:42 -0400 |
commit | 1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1 (patch) | |
tree | eca7704990f1d8e028bf6b3cba1cd9211d26b614 /src/providers/child_common.c | |
parent | 8414023e4ba838edb9712fa7e3f923f9b035665e (diff) | |
download | sssd-1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1.tar.gz sssd-1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1.tar.xz sssd-1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1.zip |
DEBUG timestamps offer higher precision
https://fedorahosted.org/sssd/ticket/956
Added: --debug-microseconds=0/1
Added: debug_microseconds to sssd.conf
Diffstat (limited to 'src/providers/child_common.c')
-rw-r--r-- | src/providers/child_common.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/providers/child_common.c b/src/providers/child_common.c index cde310c3b..5920ebc74 100644 --- a/src/providers/child_common.c +++ b/src/providers/child_common.c @@ -378,19 +378,25 @@ static errno_t prepare_child_argv(TALLOC_CTX *mem_ctx, const char *binary, char ***_argv) { - uint_t argc = 4; /* program name, debug_level, debug_timestamps and NULL */ + /* + * program name, debug_level, debug_timestamps, + * debug_microseconds and NULL + */ + uint_t argc = 5; char ** argv; errno_t ret = EINVAL; /* Save the current state in case an interrupt changes it */ bool child_debug_to_file = debug_to_file; bool child_debug_timestamps = debug_timestamps; + bool child_debug_microseconds = debug_microseconds; if (child_debug_to_file) argc++; - /* program name, debug_level, - * debug_to_file, debug_timestamps - * and NULL */ + /* + * program name, debug_level, debug_to_file, debug_timestamps, + * debug_microseconds and NULL + */ argv = talloc_array(mem_ctx, char *, argc); if (argv == NULL) { DEBUG(1, ("talloc_array failed.\n")); @@ -422,6 +428,13 @@ static errno_t prepare_child_argv(TALLOC_CTX *mem_ctx, goto fail; } + argv[--argc] = talloc_asprintf(argv, "--debug-microseconds=%d", + child_debug_microseconds); + if (argv[argc] == NULL) { + ret = ENOMEM; + goto fail; + } + argv[--argc] = talloc_strdup(argv, binary); if (argv[argc] == NULL) { ret = ENOMEM; |