[ltt-dev] [PATCH v3 3/4] char *->const char * for channel_name in ltt_relay_create_channel
Zhaolei
zhaolei at cn.fujitsu.com
Tue Nov 11 04:00:11 EST 2008
channel_name should not be changed in function.
so we should define them as const char *
Signed-off-by: Zhao Lei <zhaolei at cn.fujitsu.com>
---
include/linux/ltt-tracer.h | 2 +-
ltt/ltt-relay-locked.c | 2 +-
ltt/ltt-relay.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/ltt-tracer.h b/include/linux/ltt-tracer.h
index 937371b..15c95e3 100755
--- a/include/linux/ltt-tracer.h
+++ b/include/linux/ltt-tracer.h
@@ -174,7 +174,7 @@ struct ltt_trace_ops {
void (*remove_dirs) (struct ltt_trace_struct *new_trace);
int (*create_channel) (const char *trace_name,
struct ltt_trace_struct *trace,
- struct dentry *dir, char *channel_name,
+ struct dentry *dir, const char *channel_name,
struct ltt_channel_struct **ltt_chan,
unsigned int subbuf_size,
unsigned int n_subbufs, int overwrite);
diff --git a/ltt/ltt-relay-locked.c b/ltt/ltt-relay-locked.c
index c40bdb2..393097e 100644
--- a/ltt/ltt-relay-locked.c
+++ b/ltt/ltt-relay-locked.c
@@ -718,7 +718,7 @@ static void ltt_relay_destroy_buffer(struct ltt_channel_struct *ltt_chan,
*/
static int ltt_relay_create_channel(const char *trace_name,
struct ltt_trace_struct *trace, struct dentry *dir,
- char *channel_name, struct ltt_channel_struct **ltt_chan,
+ const char *channel_name, struct ltt_channel_struct **ltt_chan,
unsigned int subbuf_size, unsigned int n_subbufs,
int overwrite)
{
diff --git a/ltt/ltt-relay.c b/ltt/ltt-relay.c
index c6e1d52..379018d 100644
--- a/ltt/ltt-relay.c
+++ b/ltt/ltt-relay.c
@@ -731,7 +731,7 @@ static void ltt_relay_destroy_buffer(struct ltt_channel_struct *ltt_chan,
*/
static int ltt_relay_create_channel(const char *trace_name,
struct ltt_trace_struct *trace, struct dentry *dir,
- char *channel_name, struct ltt_channel_struct **ltt_chan,
+ const char *channel_name, struct ltt_channel_struct **ltt_chan,
unsigned int subbuf_size, unsigned int n_subbufs,
int overwrite)
{
--
1.5.5.3
More information about the lttng-dev
mailing list