projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adapt poll layer behaviour to match the epoll layer
[lttng-tools.git]
/
src
/
common
/
error.c
diff --git
a/src/common/error.c
b/src/common/error.c
index 236f21baee25fea33a1d9b4b35ba76796bbf3832..a7d6e1220a88be351397ce65bc919f16f2266234 100644
(file)
--- a/
src/common/error.c
+++ b/
src/common/error.c
@@
-20,6
+20,7
@@
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
+#include <errno.h>
#include <lttng/lttng-error.h>
#include <common/common.h>
#include <lttng/lttng-error.h>
#include <common/common.h>
@@
-45,6
+46,7
@@
const char *log_add_time(void)
struct tm tm, *res;
struct timespec tp;
time_t now;
struct tm tm, *res;
struct timespec tp;
time_t now;
+ const int errsv = errno;
ret = lttng_clock_gettime(CLOCK_REALTIME, &tp);
if (ret < 0) {
ret = lttng_clock_gettime(CLOCK_REALTIME, &tp);
if (ret < 0) {
@@
-65,10
+67,12
@@
const char *log_add_time(void)
goto error;
}
goto error;
}
+ errno = errsv;
return URCU_TLS(error_log_time).str;
error:
/* Return an empty string on error so logging is not affected. */
return URCU_TLS(error_log_time).str;
error:
/* Return an empty string on error so logging is not affected. */
+ errno = errsv;
return "";
}
return "";
}
This page took
0.024152 seconds
and
4
git commands to generate.