svn commit: r211997 - projects/sv/sys/net
Attilio Rao
attilio at FreeBSD.org
Mon Aug 30 14:04:29 UTC 2010
Author: attilio
Date: Mon Aug 30 14:04:29 2010
New Revision: 211997
URL: http://svn.freebsd.org/changeset/base/211997
Log:
Use 'dumping' for discriminating against dump in progress.
Modified:
projects/sv/sys/net/netdump_client.c
Modified: projects/sv/sys/net/netdump_client.c
==============================================================================
--- projects/sv/sys/net/netdump_client.c Mon Aug 30 13:26:07 2010 (r211996)
+++ projects/sv/sys/net/netdump_client.c Mon Aug 30 14:04:29 2010 (r211997)
@@ -1161,25 +1161,25 @@ netdump_trigger(void *arg, int howto)
u_int cpumap=0;
#endif
- if ((howto&(RB_HALT|RB_DUMP))!=RB_DUMP || !nd_enable) {
+ if ((howto&(RB_HALT|RB_DUMP))!=RB_DUMP || !nd_enable || cold ||
+ dumping)
return;
- }
- nd_enable = 0;
+ dumping++;
if (!nd_nic) {
printf("netdump_trigger: Can't netdump: no NIC given\n");
- nd_enable = 1;
+ dumping--;
return;
}
if (nd_server.s_addr == INADDR_ANY) {
printf("netdump_trigger: Can't netdump; no server IP given\n");
- nd_enable = 1;
+ dumping--;
return;
}
if (nd_client.s_addr == INADDR_ANY) {
printf("netdump_trigger: Can't netdump; no client IP given\n");
- nd_enable = 1;
+ dumping--;
return;
}
@@ -1226,7 +1226,7 @@ netdump_trigger(void *arg, int howto)
if(error) {
printf("netdump_trigger: Could not acquire lock on %s\n", nd_nic->if_xname);
- nd_enable = 1;
+ dumping--;
return;
}
@@ -1298,7 +1298,7 @@ cleanup:
restart_cpus(cpumap);
}
#endif
- nd_enable = 1;
+ dumping--;
}
/*-
@@ -1440,11 +1440,6 @@ DECLARE_MODULE(netdump, netdump_mod, SI_
DB_COMMAND(netdump, ddb_force_netdump)
{
- if(!nd_enable) {
- db_printf("Netdump not enabled -- could be in progress");
- return;
- }
-
netdump_trigger(NULL, RB_DUMP);
}
#endif
More information about the svn-src-projects
mailing list