aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netconsole.c
diff options
context:
space:
mode:
authorFerenc Wagner <wferi@niif.hu>2011-01-06 00:11:19 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-06 14:30:22 -0500
commit141dfba342b672588799432d74a3b6be88b5d713 (patch)
tree84fa2d4340133a9caf350cf38344fe9569671998 /drivers/net/netconsole.c
parent68d7c1aa2fee6acb11fcb826a207e4b81d8a1f57 (diff)
netconsole: don't announce stopping if nothing happened
Signed-off-by: Ferenc Wagner <wferi@niif.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r--drivers/net/netconsole.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 94255f09093d..b2ad998040fa 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -664,6 +664,7 @@ static int netconsole_netdev_event(struct notifier_block *this,
664 unsigned long flags; 664 unsigned long flags;
665 struct netconsole_target *nt; 665 struct netconsole_target *nt;
666 struct net_device *dev = ptr; 666 struct net_device *dev = ptr;
667 bool stopped = false;
667 668
668 if (!(event == NETDEV_CHANGENAME || event == NETDEV_UNREGISTER || 669 if (!(event == NETDEV_CHANGENAME || event == NETDEV_UNREGISTER ||
669 event == NETDEV_BONDING_DESLAVE || event == NETDEV_GOING_DOWN)) 670 event == NETDEV_BONDING_DESLAVE || event == NETDEV_GOING_DOWN))
@@ -690,13 +691,14 @@ static int netconsole_netdev_event(struct notifier_block *this,
690 case NETDEV_GOING_DOWN: 691 case NETDEV_GOING_DOWN:
691 case NETDEV_BONDING_DESLAVE: 692 case NETDEV_BONDING_DESLAVE:
692 nt->enabled = 0; 693 nt->enabled = 0;
694 stopped = true;
693 break; 695 break;
694 } 696 }
695 } 697 }
696 netconsole_target_put(nt); 698 netconsole_target_put(nt);
697 } 699 }
698 spin_unlock_irqrestore(&target_list_lock, flags); 700 spin_unlock_irqrestore(&target_list_lock, flags);
699 if (event == NETDEV_UNREGISTER || event == NETDEV_BONDING_DESLAVE) 701 if (stopped && (event == NETDEV_UNREGISTER || event == NETDEV_BONDING_DESLAVE))
700 printk(KERN_INFO "netconsole: network logging stopped, " 702 printk(KERN_INFO "netconsole: network logging stopped, "
701 "interface %s %s\n", dev->name, 703 "interface %s %s\n", dev->name,
702 event == NETDEV_UNREGISTER ? "unregistered" : "released slaves"); 704 event == NETDEV_UNREGISTER ? "unregistered" : "released slaves");