HomeClusterLabs Projects

Refactor: tools: Rearrange crm_mon's main function.

Description

Refactor: tools: Rearrange crm_mon's main function.

The purpose of this patch is to make sure output_format is not changed
after pcmkoutput_new is called. There is an awful lot of places where
we change output_format after checking various flags and command line
options. Thus, pcmk
output_new and related code must get called after
all of that but just before we actually do anything.

At the same time, we need to be careful to not initialize curses if
--version was passed. Thus, all the code doing all the checking should
not be run if we saw that command line option.

Details

Provenance
clumensAuthored on Oct 2 2019, 4:40 PM
Parents
rP452a73297a55: Refactor: tools: Move some of crm_mon's main into functions.
Branches
Unknown
Tags
Unknown