diff -r ca243216ec9e -r 0699314f0c3e configs/dist/sw.py --- a/configs/dist/sw.py Tue Dec 06 17:43:58 2016 +0000 +++ b/configs/dist/sw.py Tue Dec 06 17:45:34 2016 +0000 @@ -63,13 +63,17 @@ link.int0 = switch.interface[i] return switch -# Add options -parser = optparse.OptionParser() -Options.addCommonOptions(parser) -Options.addFSOptions(parser) -(options, args) = parser.parse_args() -system = build_switch(options) -root = Root(full_system = True, system = system) -Simulation.run(options, root, None, None) +def main(): + # Add options + parser = optparse.OptionParser() + Options.addCommonOptions(parser) + Options.addFSOptions(parser) + (options, args) = parser.parse_args() + system = build_switch(options) + root = Root(full_system = True, system = system) + Simulation.run(options, root, None, None) + +if __name__ == "__m5_main__": + main()