diff options
Diffstat (limited to 'net/tipc/config.c')
-rw-r--r-- | net/tipc/config.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/net/tipc/config.c b/net/tipc/config.c index 019f46c0690c..c2ad2ff32a15 100644 --- a/net/tipc/config.c +++ b/net/tipc/config.c | |||
@@ -83,38 +83,6 @@ struct sk_buff *tipc_cfg_reply_string_type(u16 tlv_type, char *string) | |||
83 | return buf; | 83 | return buf; |
84 | } | 84 | } |
85 | 85 | ||
86 | static struct sk_buff *tipc_show_stats(void) | ||
87 | { | ||
88 | struct sk_buff *buf; | ||
89 | struct tlv_desc *rep_tlv; | ||
90 | char *pb; | ||
91 | int pb_len; | ||
92 | int str_len; | ||
93 | u32 value; | ||
94 | |||
95 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED)) | ||
96 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | ||
97 | |||
98 | value = ntohl(*(u32 *)TLV_DATA(req_tlv_area)); | ||
99 | if (value != 0) | ||
100 | return tipc_cfg_reply_error_string("unsupported argument"); | ||
101 | |||
102 | buf = tipc_cfg_reply_alloc(TLV_SPACE(ULTRA_STRING_MAX_LEN)); | ||
103 | if (buf == NULL) | ||
104 | return NULL; | ||
105 | |||
106 | rep_tlv = (struct tlv_desc *)buf->data; | ||
107 | pb = TLV_DATA(rep_tlv); | ||
108 | pb_len = ULTRA_STRING_MAX_LEN; | ||
109 | |||
110 | str_len = tipc_snprintf(pb, pb_len, "TIPC version " TIPC_MOD_VER "\n"); | ||
111 | str_len += 1; /* for "\0" */ | ||
112 | skb_put(buf, TLV_SPACE(str_len)); | ||
113 | TLV_SET(rep_tlv, TIPC_TLV_ULTRA_STRING, NULL, str_len); | ||
114 | |||
115 | return buf; | ||
116 | } | ||
117 | |||
118 | struct sk_buff *tipc_cfg_do_cmd(struct net *net, u32 orig_node, u16 cmd, | 86 | struct sk_buff *tipc_cfg_do_cmd(struct net *net, u32 orig_node, u16 cmd, |
119 | const void *request_area, int request_space, | 87 | const void *request_area, int request_space, |
120 | int reply_headroom) | 88 | int reply_headroom) |
@@ -142,9 +110,6 @@ struct sk_buff *tipc_cfg_do_cmd(struct net *net, u32 orig_node, u16 cmd, | |||
142 | case TIPC_CMD_NOOP: | 110 | case TIPC_CMD_NOOP: |
143 | rep_tlv_buf = tipc_cfg_reply_none(); | 111 | rep_tlv_buf = tipc_cfg_reply_none(); |
144 | break; | 112 | break; |
145 | case TIPC_CMD_SHOW_STATS: | ||
146 | rep_tlv_buf = tipc_show_stats(); | ||
147 | break; | ||
148 | case TIPC_CMD_NOT_NET_ADMIN: | 113 | case TIPC_CMD_NOT_NET_ADMIN: |
149 | rep_tlv_buf = | 114 | rep_tlv_buf = |
150 | tipc_cfg_reply_error_string(TIPC_CFG_NOT_NET_ADMIN); | 115 | tipc_cfg_reply_error_string(TIPC_CFG_NOT_NET_ADMIN); |