From: Mathieu Desnoyers Date: Wed, 8 Dec 2010 20:31:06 +0000 (-0500) Subject: Fix event creation X-Git-Tag: v2.0-pre1~200 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=981616e86a837a180a606055e7e06ce6eb105ce6;p=lttng-modules.git Fix event creation Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt-debugfs-abi.c b/ltt-debugfs-abi.c index d136a779..5741eda2 100644 --- a/ltt-debugfs-abi.c +++ b/ltt-debugfs-abi.c @@ -268,7 +268,7 @@ int lttng_abi_create_event(struct file *channel_file, event_name = kmalloc(PATH_MAX, GFP_KERNEL); if (!event_name) return -ENOMEM; - if (strncpy_from_user(event_name, uevent_param->name, PATH_MAX)) { + if (strncpy_from_user(event_name, uevent_param->name, PATH_MAX) < 0) { ret = -EFAULT; goto name_error; } diff --git a/ltt-events.c b/ltt-events.c index 60317068..b8dbec69 100644 --- a/ltt-events.c +++ b/ltt-events.c @@ -124,7 +124,6 @@ struct ltt_channel *ltt_channel_create(struct ltt_session *session, transport_name); goto notransport; } - printk("got transport\n"); chan = kzalloc(sizeof(struct ltt_channel), GFP_KERNEL); if (!chan) goto nomem; @@ -133,7 +132,6 @@ struct ltt_channel *ltt_channel_create(struct ltt_session *session, chan->chan = transport->ops.channel_create("[lttng]", session, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval); - printk("chan create %p\n", chan->chan); if (!chan->chan) goto create_error; chan->ops = &transport->ops;