Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] [lttng-tools PATCH 0/2] utils_expand_path as realpath(3) for non-existing directories
@ 2013-11-08  4:32 Raphaël Beamonte
  2013-11-08  4:32 ` [lttng-dev] [lttng-tools PATCH 1/2] Introduce a new utils_resolve_relative function Raphaël Beamonte
  2013-11-08  4:32 ` [lttng-dev] [lttng-tools PATCH 2/2] Correct the behavior of the utils_expand_path function Raphaël Beamonte
  0 siblings, 2 replies; 32+ messages in thread
From: Raphaël Beamonte @ 2013-11-08  4:32 UTC (permalink / raw)


The utils_expand_path function of lttng-tools, in src/common/utils.c,
was meant to replace the realpath(3) function of glibc in cases we
want to allow non-existing paths, such as specifying the output directory
for a trace.
While using the lttng-tools command line to create some traces, I found
out that some use cases weren't working. For instance, using paths like
"foo", "bar/" or "bar/foo" when the "bar" directory does not exist was
not working.

This series of two (2) patches aims to correct the behavior of the
utils_expand_path function, introducing a new utils_resolve_relative
function meant to resolve relative paths ("./" and "../") in the middle
of a path string.


Rapha?l Beamonte (2):
  Introduce a new utils_resolve_relative function
  Correct the behavior of the utils_expand_path function

 src/common/utils.c |  120 +++++++++++++++++++++++++++++++++++++++++++---------
 src/common/utils.h |    1 +
 2 files changed, 100 insertions(+), 21 deletions(-)

-- 
1.7.10.4




^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2013-11-25 15:51 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-08  4:32 [lttng-dev] [lttng-tools PATCH 0/2] utils_expand_path as realpath(3) for non-existing directories Raphaël Beamonte
2013-11-08  4:32 ` [lttng-dev] [lttng-tools PATCH 1/2] Introduce a new utils_resolve_relative function Raphaël Beamonte
2013-11-12 19:51   ` David Goulet
2013-11-13  5:34     ` [lttng-dev] [lttng-tools PATCH 0/4] Update to utils_expand_path as realpath(3) for non-existing directories Raphaël Beamonte
2013-11-13  5:34       ` [lttng-dev] [lttng-tools PATCH 1/4] Introduce a new utils_resolve_relative function Raphaël Beamonte
2013-11-14 14:19         ` Mathieu Desnoyers
2013-11-14 17:07           ` Raphaël Beamonte
2013-11-13  5:34       ` [lttng-dev] [lttng-tools PATCH 2/4] Tests: Add test_utils_resolve_relative to unit tests Raphaël Beamonte
2013-11-13  5:34       ` [lttng-dev] [lttng-tools PATCH 3/4] Correct the behavior of the utils_expand_path function Raphaël Beamonte
2013-11-14  2:44         ` Mathieu Desnoyers
2013-11-14  3:27           ` Raphaël Beamonte
2013-11-14 13:46             ` Mathieu Desnoyers
2013-11-14 14:10         ` Mathieu Desnoyers
2013-11-14 16:00           ` Raphaël Beamonte
2013-11-14 16:14             ` Mathieu Desnoyers
2013-11-15  0:58               ` [lttng-dev] [lttng-tools PATCH 0/5] Follow up to the realpath(3) for unexistent paths Raphaël Beamonte
2013-11-15  0:58                 ` [lttng-dev] [lttng-tools PATCH 1/5] Tests: add a check in test_utils_expand_path to avoid segfault if result is NULL Raphaël Beamonte
2013-11-15  0:58                 ` [lttng-dev] [lttng-tools PATCH 2/5] Tests: move invalid tests in test_utils_expand_path that should be valid Raphaël Beamonte
2013-11-15  0:58                 ` [lttng-dev] [lttng-tools PATCH 3/5] Introduce a new utils_partial_realpath function Raphaël Beamonte
2013-11-15  0:58                 ` [lttng-dev] [lttng-tools PATCH 4/5] Change the utils_expand_path function to use utils_partial_realpath Raphaël Beamonte
2013-11-15  0:58                 ` [lttng-dev] [lttng-tools PATCH 5/5] Remove the utils_resolve_relative function that is not useful anymore Raphaël Beamonte
2013-11-15 15:45                 ` [lttng-dev] [lttng-tools PATCH 0/5] Follow up to the realpath(3) for unexistent paths David Goulet
2013-11-23 22:32                   ` [lttng-dev] [lttng-tools PATCH 0/5] utils_expand_path fix Raphaël Beamonte
2013-11-23 22:32                     ` [lttng-dev] [lttng-tools PATCH 1/5] Add missing copyright to utils.c Raphaël Beamonte
2013-11-23 22:32                     ` [lttng-dev] [lttng-tools PATCH 2/5] Fix: comment indentation Raphaël Beamonte
2013-11-23 22:32                     ` [lttng-dev] [lttng-tools PATCH 3/5] Fix: utils_expand_path now works for paths that ends with '/.' or '/..' Raphaël Beamonte
2013-11-23 22:32                     ` [lttng-dev] [lttng-tools PATCH 4/5] Tests: add symlink tests for test_utils_expand_path Raphaël Beamonte
2013-11-23 22:32                     ` [lttng-dev] [lttng-tools PATCH 5/5] Tests: add valid test cases to test_utils_expand_path Raphaël Beamonte
2013-11-25 15:51                     ` [lttng-dev] [lttng-tools PATCH 0/5] utils_expand_path fix David Goulet
2013-11-13  5:34       ` [lttng-dev] [lttng-tools PATCH 4/4] Tests: Add test_utils_expand_path to unit tests Raphaël Beamonte
2013-11-13 21:28       ` [lttng-dev] [lttng-tools PATCH 0/4] Update to utils_expand_path as realpath(3) for non-existing directories David Goulet
2013-11-08  4:32 ` [lttng-dev] [lttng-tools PATCH 2/2] Correct the behavior of the utils_expand_path function Raphaël Beamonte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox