projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement the RELAYD_ROTATE_PENDING relay daemon command
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
utils.c
diff --git
a/src/bin/lttng-relayd/utils.c
b/src/bin/lttng-relayd/utils.c
index ad13d3277eb4106c7320bfbe3563d53ba57c1d72..837c828d22b935cb7eb353a60f6d3e93f2dc277d 100644
(file)
--- a/
src/bin/lttng-relayd/utils.c
+++ b/
src/bin/lttng-relayd/utils.c
@@
-16,7
+16,7
@@
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _
GNU
_SOURCE
+#define _
LGPL
_SOURCE
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
@@
-29,22
+29,14
@@
#include "lttng-relayd.h"
#include "utils.h"
#include "lttng-relayd.h"
#include "utils.h"
-/*
- * Returns the HOME directory path. Caller MUST NOT free(3) the return pointer.
- */
-static char *get_default_path(void)
-{
- return getenv("HOME");
-}
-
-static char *create_output_path_auto(char *path_name)
+static char *create_output_path_auto(const char *path_name)
{
int ret;
char *traces_path = NULL;
char *alloc_path = NULL;
char *default_path;
{
int ret;
char *traces_path = NULL;
char *alloc_path = NULL;
char *default_path;
- default_path =
get_default_path
();
+ default_path =
utils_get_home_dir
();
if (default_path == NULL) {
ERR("Home path not found.\n \
Please specify an output path using -o, --output PATH");
if (default_path == NULL) {
ERR("Home path not found.\n \
Please specify an output path using -o, --output PATH");
@@
-66,7
+58,7
@@
exit:
return traces_path;
}
return traces_path;
}
-static char *create_output_path_noauto(char *path_name)
+static char *create_output_path_noauto(c
onst c
har *path_name)
{
int ret;
char *traces_path = NULL;
{
int ret;
char *traces_path = NULL;
@@
-92,7
+84,7
@@
exit:
*
* Return the allocated string containing the path name or else NULL.
*/
*
* Return the allocated string containing the path name or else NULL.
*/
-char *create_output_path(char *path_name)
+char *create_output_path(c
onst c
har *path_name)
{
assert(path_name);
{
assert(path_name);
This page took
0.025467 seconds
and
4
git commands to generate.