|
The initial implementation of default, boxless and csv report formats
required making the report format ops structures global. Getoptions()
referred directly to these structures when assigning the active ops
pointer.
This patch adds a name field to the structures and places pointers
to the structures in a special segment so that the list of ops
structures can be iterated like an array without having to create
such an array explicitly. Getoptions() is modified to record only
the name and main() will then obtain the actual structure pointer
by name.
The ops array head and sentinel is combined into the same source
files that have been used for trace file ops arrays. The files
are renamed to ops_head.c and ops_tail.c.
Command line options parsing now checks that there is only one
specification of report format. Usage function lists the available
formats. -C and -B are retained as shortcuts for -r csv and
-r boxless, respectively.
Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
|