mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
param: remove reset_nostart
Since we have reset_excludes and SYS_AUTOSTART and SYS_AUTOCONFIG can be excluded like every other parameter.
This commit is contained in:
@@ -95,7 +95,6 @@ static int do_compare(const char *name, char *vals[], unsigned comparisons, enum
|
||||
static int do_reset_all(const char *excludes[], int num_excludes);
|
||||
static int do_reset_specific(const char *resets[], int num_resets);
|
||||
static int do_touch(const char *params[], int num_params);
|
||||
static int do_reset_nostart(const char *excludes[], int num_excludes);
|
||||
static int do_find(const char *name);
|
||||
|
||||
static void print_usage()
|
||||
@@ -166,9 +165,6 @@ $ reboot
|
||||
PRINT_MODULE_USAGE_ARG("<param1> [<param2>]", "Parameter names to reset (wildcard at end allowed)", true);
|
||||
PRINT_MODULE_USAGE_COMMAND_DESCR("reset_all", "Reset all params to default");
|
||||
PRINT_MODULE_USAGE_ARG("<exclude1> [<exclude2>]", "Do not reset matching params (wildcard at end allowed)", true);
|
||||
PRINT_MODULE_USAGE_COMMAND_DESCR("reset_nostart",
|
||||
"Reset params to default, but keep SYS_AUTOSTART and SYS_AUTOCONFIG");
|
||||
PRINT_MODULE_USAGE_ARG("<exclude1> [<exclude2>]", "Do not reset matching params (wildcard at end allowed)", true);
|
||||
|
||||
PRINT_MODULE_USAGE_COMMAND_DESCR("index", "Show param for a given index");
|
||||
PRINT_MODULE_USAGE_ARG("<index>", "Index: an integer >= 0", false);
|
||||
@@ -331,15 +327,6 @@ param_main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp(argv[1], "reset_nostart")) {
|
||||
if (argc >= 3) {
|
||||
return do_reset_nostart((const char **) &argv[2], argc - 2);
|
||||
|
||||
} else {
|
||||
return do_reset_nostart(nullptr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp(argv[1], "index_used")) {
|
||||
if (argc >= 3) {
|
||||
return do_show_index(argv[2], true);
|
||||
@@ -836,25 +823,3 @@ do_touch(const char *params[], int num_params)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
do_reset_nostart(const char *excludes[], int num_excludes)
|
||||
{
|
||||
int32_t autostart;
|
||||
int32_t autoconfig;
|
||||
|
||||
(void)param_get(param_find("SYS_AUTOSTART"), &autostart);
|
||||
(void)param_get(param_find("SYS_AUTOCONFIG"), &autoconfig);
|
||||
|
||||
if (num_excludes > 0) {
|
||||
param_reset_excludes(excludes, num_excludes);
|
||||
|
||||
} else {
|
||||
param_reset_all();
|
||||
}
|
||||
|
||||
(void)param_set(param_find("SYS_AUTOSTART"), &autostart);
|
||||
(void)param_set(param_find("SYS_AUTOCONFIG"), &autoconfig);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user