Fix: make lttng expand path for trace output opt
authorDavid Goulet <dgoulet@efficios.com>
Thu, 5 Apr 2012 15:39:59 +0000 (11:39 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 5 Apr 2012 16:02:56 +0000 (12:02 -0400)
commit94dd71b967efa722af734ee067025ef11011a3c8
tree6ef866ec125abda76880218db68af87873893692
parentdab4fc145b926b13e1d1ba6c6047a1e2a9c46002
Fix: make lttng expand path for trace output opt

lttng create --output was passing the path string to the session daemon
and thus, for relative path like './mytraces', it was created in the
current directory of the session daemon.

Now lttng command line uses the realpath(3) of the --output string and
denies creation if multiple level of directory does not exist (Ex:
/tmp/foo/bar/chap, if foo/ does not exist, it is refused).

Directory creation still occurs on the session daemon side.

Reported-by: Ettore Del Negro <ettore@ettoredelnegro.me>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng/commands/create.c
src/bin/lttng/utils.c
src/bin/lttng/utils.h
This page took 0.024584 seconds and 4 git commands to generate.