-----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Monday, November 09, 2009 10:32 AM To: Beckmann, Brad Subject: [PATCH 07 of 31] ruby: Added error check for openning the ruby configfile
# HG changeset patch # User Brad Beckmann <[email protected]> # Date 1257791382 28800 # Node ID 856ec7a1c978ed7a890b54e6ca62f45e0a623640 # Parent ec27bcf8f5c1cb067a8e70265be676e5fa12787f ruby: Added error check for openning the ruby config file diff -r ec27bcf8f5c1 -r 856ec7a1c978 src/mem/rubymem.cc --- a/src/mem/rubymem.cc Mon Nov 09 10:29:42 2009 -0800 +++ b/src/mem/rubymem.cc Mon Nov 09 10:29:42 2009 -0800 @@ -58,8 +58,15 @@ ruby_clock = p->clock; ruby_phase = p->phase; + DPRINTF(Ruby, "creating Ruby Memory from file %s\n", + p->config_file.c_str()); + ifstream config(p->config_file.c_str()); + if (config.good() == false) { + fatal("Did not successfully open %s.\n", p->config_file.c_str()); + } + vector<RubyObjConf> sys_conf; while (!config.eof()) { char buffer[65536]; _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
