Removes all references to TIPC's "not running" mode, since the
removal of support for the native API means that there is no longer
any way to interact with TIPC if it has not been initialized.
The changes made consist of removing mode-based checks that are no
longer needed, along with any associated code lying on non-executable
control paths.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
if (value < 127 || value > 65535)
return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
" (max ports must be 127-65535)");
- if (tipc_mode != TIPC_NOT_RUNNING)
- return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
- " (cannot change max ports while TIPC is active)");
- tipc_max_ports = value;
- return tipc_cfg_reply_none();
+ return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
+ " (cannot change max ports while TIPC is active)");
}
static struct sk_buff *cfg_set_netid(void)
/* global variables used by multiple sub-systems within TIPC */
-int tipc_mode = TIPC_NOT_RUNNING;
+int tipc_mode;
int tipc_random;
const char tipc_alphabet[] =
static void tipc_core_stop(void)
{
- if (tipc_mode != TIPC_NODE_MODE)
- return;
-
- tipc_mode = TIPC_NOT_RUNNING;
-
tipc_netlink_stop();
tipc_handler_stop();
tipc_cfg_stop();
{
int res;
- if (tipc_mode != TIPC_NOT_RUNNING)
- return -ENOPROTOOPT;
-
get_random_bytes(&tipc_random, sizeof(tipc_random));
tipc_mode = TIPC_NODE_MODE;
/*
* TIPC operating mode routines
*/
-#define TIPC_NOT_RUNNING 0
+
#define TIPC_NODE_MODE 1
#define TIPC_NET_MODE 2