reg: Move duplicate /v, /ve and /va combination checks to wmain.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0f7bdf7d57
commit
17d606a3b9
|
@ -350,12 +350,6 @@ static int reg_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty,
|
|||
{
|
||||
HKEY key;
|
||||
|
||||
if (value_name && value_empty)
|
||||
{
|
||||
output_message(STRING_INVALID_CMDLINE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (RegCreateKeyW(root, path, &key) != ERROR_SUCCESS)
|
||||
{
|
||||
output_message(STRING_INVALID_KEY);
|
||||
|
@ -416,12 +410,6 @@ static int reg_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name
|
|||
{
|
||||
HKEY key;
|
||||
|
||||
if ((value_name && value_empty) || (value_name && value_all) || (value_empty && value_all))
|
||||
{
|
||||
output_message(STRING_INVALID_CMDLINE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!force)
|
||||
{
|
||||
BOOL ret;
|
||||
|
@ -808,12 +796,6 @@ static int reg_query(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name,
|
|||
WCHAR newlineW[] = {'\n',0};
|
||||
int ret;
|
||||
|
||||
if (value_name && value_empty)
|
||||
{
|
||||
output_message(STRING_INVALID_CMDLINE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (RegOpenKeyExW(root, path, 0, KEY_READ, &key) != ERROR_SUCCESS)
|
||||
{
|
||||
output_message(STRING_CANNOT_FIND);
|
||||
|
@ -990,6 +972,12 @@ int wmain(int argc, WCHAR *argvW[])
|
|||
force = TRUE;
|
||||
}
|
||||
|
||||
if ((value_name && value_empty) || (value_name && value_all) || (value_empty && value_all))
|
||||
{
|
||||
output_message(STRING_INVALID_CMDLINE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (op == REG_ADD)
|
||||
ret = reg_add(root, path, value_name, value_empty, type, separator, data, force);
|
||||
else if (op == REG_DELETE)
|
||||
|
|
Loading…
Reference in New Issue