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 15:58:01 +0000 (11:58 -0400)
commit3badf2bf32930336a4902002d840402adb6859e1
tree6cdf7d7b5660ad4b774724e2be6223bf2b0dbb30
parent51c96b7d50ed76d2f42fba47e0a7ff8eaf38b7ef
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.027129 seconds and 4 git commands to generate.