This shouldn't be on the maintab.cpp, this file is already too convoluted.
[Dirk Hohndel: slightly refactored this commit and the next one to make
the code actually work and make the split across the two
commits more reasonable]
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>