... loads all the config files & a directory of modules OR loads the modules listed in commandline args, converts the modules hashmap into an array, parses a modules.order file consulting the hashmap, computes a topological sort of dependencies from the gathered collections, & outputs the results in a choice of format.
After parsing flags filling in missing onesmodinfo builds a KMod context & iterates over remaining args (which it validates exist) loading their modules in 1 of 3 ways.