X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fsave.c;h=555006d0aff1350938c450aea93f481583a6b018;hb=a58c490f0bff52a73717d31d04d1472629180de2;hp=d2a7e67c55a14b75719ada6355b970039f292f9c;hpb=36d2e35df61339e4394e84ad9790b984d259e0f0;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/save.c b/src/lib/lttng-ctl/save.c index d2a7e67c5..555006d0a 100644 --- a/src/lib/lttng-ctl/save.c +++ b/src/lib/lttng-ctl/save.c @@ -15,7 +15,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include @@ -69,6 +68,18 @@ int lttng_save_session_attr_get_overwrite( return attr ? attr->overwrite : -LTTNG_ERR_INVALID; } +int lttng_save_session_attr_get_omit_name( + struct lttng_save_session_attr *attr) +{ + return attr ? attr->omit_name : -LTTNG_ERR_INVALID; +} + +int lttng_save_session_attr_get_omit_output( + struct lttng_save_session_attr *attr) +{ + return attr ? attr->omit_output : -LTTNG_ERR_INVALID; +} + int lttng_save_session_attr_set_session_name( struct lttng_save_session_attr *attr, const char *session_name) { @@ -152,6 +163,36 @@ end: return ret; } +int lttng_save_session_attr_set_omit_name( + struct lttng_save_session_attr *attr, int omit_name) +{ + int ret = 0; + + if (!attr) { + ret = -LTTNG_ERR_INVALID; + goto end; + } + + attr->omit_name = !!omit_name; +end: + return ret; +} + +int lttng_save_session_attr_set_omit_output( + struct lttng_save_session_attr *attr, int omit_output) +{ + int ret = 0; + + if (!attr) { + ret = -LTTNG_ERR_INVALID; + goto end; + } + + attr->omit_output = !!omit_output; +end: + return ret; +} + /* * The lttng-ctl API does not expose all the information needed to save the * session configurations. Thus, we must send a save command to the session