Cleanup: don't spawn per-user thread if HOME is not set

Reported-by: David OShea <David.OShea@quantum.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: Conditionally disable tests requiring shared libs support

When building lttng-ust with shared library support explicitly
disabled (e.g.: ./configure --disable-shared), libtool fail with
a fatal error:

  CC       tp.lo
  CC       tp2.lo
  CCLD     liblttng-ust-provider-ust-tests-demo.la
libtool: link: can not build a shared library
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.

The build should not fail because some tests require explicit shared
library support, instead they should be skipped.

This patch detect that the --disable-shared flag was passed to the
configure script and toggle the "NO_SHARED" Automake variable.
Thus, the tests that require explicit shared library support can
be skipped when the NO_SHARED variable is true.

[ Edit by Mathieu Desnoyers: add "" in configure.ac to follow the local
  coding style. ]

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Distinguish UST return codes from transport return codes

One API change visible from lttng-tools: -ENOENT return values for
tracepoint list and tracepoint field list are now -LTTNG_UST_ERR_NOENT.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tear down handles associated with a closed sessiond socket

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: re-allow non-lvalue string, sequence, array parameters

Issue introduced by upstream commit:

  commit 27f4b6094f399f2fe231b58801dce98cbd21baa9
  Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  Date: Tue Sep 4 12:17:07 2012 -0400

  Fix filter: pointer to string, not string, should be on stack

  Fixes #329

Reported-by: David Bryant <david.bryant@quantum.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: add const qualifier for filter local void *

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: configure.ac should use "--target", not "--host"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Revert "Fix: configure.ac should use "--target", not "--host""

This reverts commit 98c8a1d90d1052980365353eef201124863128b0.

No. --target is for building cross-compilers. --host was  appropriate.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add libc errno translation layer to UST error code

Also add four new possible code being EEXIST, EINVAL, ENOSYS and EPERM.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Remove LIBFORMAT config declaration, unused

Remove leftover from UST 0.x. Not needed anymore.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
document that tracepoint names should ideally not be re-used

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Filter iteration: iterate on list of filters

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
filter: add seqnum field to filter command

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cleanup: add lttng_/lttng-/LTTNG_ prefixes

ltt_event -> lttng_event mass rename
Rename ltt_chan -> lttng_chan
Rename ltt_session -> lttng_session
Rename enum abstract_types to enum lttng_abstract_types
Rename ltt_transport to lttng_transport
Rename rest of ltt_ prefixes to lttng_
Complete file and symbol renames from LTT/ltt to LTTNG/lttng
Finish ltt->lttng symbol conversion

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Implement support for overlapping wildcard/events

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
filters: perform union rather than intersection

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: add missing seqnum field to filter

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: filter link fail handling

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: filter: var len array at end of external structure

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Filter: use only single lower bit of filter return value

Implementation change: use a uint64_t as filter return value, and test
with a mask for this bit. This reserves other bits for future use.

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>