vzctl set: untangle the mess with opt.save
opt.save was used for two purposes
1. to hold if the --save flag was set on the command line
2. to suppress "Warning: parameters not saved" warning
This was a very bad decision which resulted in some kind of mess.
This patch starts to untangle it, but introducing a separate
"don't warn about non-saved changes" variable.
Also, this patch solves the following issue. When --userpasswd is given,
there is no need to warn about absense of --save flag. But if there are
other options given as well, we should give that warning.
Since we have argc now, we can check if --userpasswd was the only
option, and disable the warning only in this case.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed