]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
batman-adv: Prefix vis non-static functions with batadv_
authorSven Eckelmann <sven@narfation.org>
Sat, 12 May 2012 00:09:41 +0000 (02:09 +0200)
committerAntonio Quartulli <ordex@autistici.org>
Wed, 20 Jun 2012 20:15:31 +0000 (22:15 +0200)
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/bat_debugfs.c
net/batman-adv/main.c
net/batman-adv/routing.c
net/batman-adv/vis.c
net/batman-adv/vis.h

index 93cc0d14c70a9fe145687e0f283a6b35ce23745e..ad377aba06619ec7023cd882213c3fd5abbe970e 100644 (file)
@@ -263,7 +263,7 @@ static int transtable_local_open(struct inode *inode, struct file *file)
 static int vis_data_open(struct inode *inode, struct file *file)
 {
        struct net_device *net_dev = (struct net_device *)inode->i_private;
-       return single_open(file, vis_seq_print_text, net_dev);
+       return single_open(file, batadv_vis_seq_print_text, net_dev);
 }
 
 struct bat_debuginfo {
index 8d2011b8ed3522b687968db9ea16ad47b1bc3776..ffea3609ea41d566c59bf155d2c3818b80229b04 100644 (file)
@@ -121,7 +121,7 @@ int mesh_init(struct net_device *soft_iface)
 
        batadv_tt_local_add(soft_iface, soft_iface->dev_addr, NULL_IFINDEX);
 
-       ret = vis_init(bat_priv);
+       ret = batadv_vis_init(bat_priv);
        if (ret < 0)
                goto err;
 
@@ -147,7 +147,7 @@ void mesh_free(struct net_device *soft_iface)
 
        batadv_purge_outstanding_packets(bat_priv, NULL);
 
-       vis_quit(bat_priv);
+       batadv_vis_quit(bat_priv);
 
        batadv_gw_node_purge(bat_priv);
        batadv_originator_free(bat_priv);
index 4103f68ae9db7cec7724a488fa804fef8fd4e846..d492634dd0402a711807a3638938b314eecfb92a 100644 (file)
@@ -1151,13 +1151,13 @@ int batadv_recv_vis_packet(struct sk_buff *skb, struct hard_iface *recv_if)
 
        switch (vis_packet->vis_type) {
        case VIS_TYPE_SERVER_SYNC:
-               receive_server_sync_packet(bat_priv, vis_packet,
-                                          skb_headlen(skb));
+               batadv_receive_server_sync_packet(bat_priv, vis_packet,
+                                                 skb_headlen(skb));
                break;
 
        case VIS_TYPE_CLIENT_UPDATE:
-               receive_client_update_packet(bat_priv, vis_packet,
-                                            skb_headlen(skb));
+               batadv_receive_client_update_packet(bat_priv, vis_packet,
+                                                   skb_headlen(skb));
                break;
 
        default:        /* ignore unknown packet */
index c56737cba0e2144d96af1610667e787b279319c5..24040c300636999bb87717e7305b58aa3230198a 100644 (file)
@@ -188,7 +188,7 @@ static ssize_t vis_data_read_entry(char *buff,
        return 0;
 }
 
-int vis_seq_print_text(struct seq_file *seq, void *offset)
+int batadv_vis_seq_print_text(struct seq_file *seq, void *offset)
 {
        struct hard_iface *primary_if;
        struct hlist_node *node;
@@ -483,9 +483,9 @@ static struct vis_info *add_packet(struct bat_priv *bat_priv,
 }
 
 /* handle the server sync packet, forward if needed. */
-void receive_server_sync_packet(struct bat_priv *bat_priv,
-                               struct vis_packet *vis_packet,
-                               int vis_info_len)
+void batadv_receive_server_sync_packet(struct bat_priv *bat_priv,
+                                      struct vis_packet *vis_packet,
+                                      int vis_info_len)
 {
        struct vis_info *info;
        int is_new, make_broadcast;
@@ -508,9 +508,9 @@ end:
 }
 
 /* handle an incoming client update packet and schedule forward if needed. */
-void receive_client_update_packet(struct bat_priv *bat_priv,
-                                 struct vis_packet *vis_packet,
-                                 int vis_info_len)
+void batadv_receive_client_update_packet(struct bat_priv *bat_priv,
+                                        struct vis_packet *vis_packet,
+                                        int vis_info_len)
 {
        struct vis_info *info;
        struct vis_packet *packet;
@@ -880,7 +880,7 @@ static void send_vis_packets(struct work_struct *work)
 
 /* init the vis server. this may only be called when if_list is already
  * initialized (e.g. bat0 is initialized, interfaces have been added) */
-int vis_init(struct bat_priv *bat_priv)
+int batadv_vis_init(struct bat_priv *bat_priv)
 {
        struct vis_packet *packet;
        int hash_added;
@@ -944,7 +944,7 @@ free_info:
        bat_priv->my_vis_info = NULL;
 err:
        spin_unlock_bh(&bat_priv->vis_hash_lock);
-       vis_quit(bat_priv);
+       batadv_vis_quit(bat_priv);
        return -ENOMEM;
 }
 
@@ -959,7 +959,7 @@ static void free_info_ref(struct hlist_node *node, void *arg)
 }
 
 /* shutdown vis-server */
-void vis_quit(struct bat_priv *bat_priv)
+void batadv_vis_quit(struct bat_priv *bat_priv)
 {
        if (!bat_priv->vis_hash)
                return;
index ee2e46e5347b27749130974ff3bb5ea8a2dd8f16..932514e4b7d7c8c98a196315dfcd8a76972e6427 100644 (file)
 #define VIS_TIMEOUT            200000  /* timeout of vis packets
                                         * in miliseconds */
 
-int vis_seq_print_text(struct seq_file *seq, void *offset);
-void receive_server_sync_packet(struct bat_priv *bat_priv,
-                               struct vis_packet *vis_packet,
-                               int vis_info_len);
-void receive_client_update_packet(struct bat_priv *bat_priv,
-                                 struct vis_packet *vis_packet,
-                                 int vis_info_len);
-int vis_init(struct bat_priv *bat_priv);
-void vis_quit(struct bat_priv *bat_priv);
+int batadv_vis_seq_print_text(struct seq_file *seq, void *offset);
+void batadv_receive_server_sync_packet(struct bat_priv *bat_priv,
+                                      struct vis_packet *vis_packet,
+                                      int vis_info_len);
+void batadv_receive_client_update_packet(struct bat_priv *bat_priv,
+                                        struct vis_packet *vis_packet,
+                                        int vis_info_len);
+int batadv_vis_init(struct bat_priv *bat_priv);
+void batadv_vis_quit(struct bat_priv *bat_priv);
 
 #endif /* _NET_BATMAN_ADV_VIS_H_ */