/[gxemul]/trunk/src/emul_parse.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/emul_parse.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 31 by dpavlin, Mon Oct 8 16:19:56 2007 UTC revision 32 by dpavlin, Mon Oct 8 16:20:58 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: emul_parse.c,v 1.42 2006/06/22 13:22:41 debug Exp $   *  $Id: emul_parse.c,v 1.44 2006/09/05 06:13:27 debug Exp $
29   *   *
30   *  Set up an emulation by parsing a config file.   *  Set up an emulation by parsing a config file.
31   *   *
# Line 321  static void parse__emul(struct emul *e, Line 321  static void parse__emul(struct emul *e,
321                      line, EXPECT_LEFT_PARENTHESIS);                      line, EXPECT_LEFT_PARENTHESIS);
322    
323                  /*  Default net:  */                  /*  Default net:  */
324                  strlcpy(cur_net_ipv4net, "10.0.0.0", sizeof(cur_net_ipv4net));                  strlcpy(cur_net_ipv4net, NET_DEFAULT_IPV4_MASK,
325                  strlcpy(cur_net_ipv4len, "8", sizeof(cur_net_ipv4len));                      sizeof(cur_net_ipv4net));
326                    snprintf(cur_net_ipv4len, sizeof(cur_net_ipv4len), "%i",
327                        NET_DEFAULT_IPV4_LEN);
328                  strlcpy(cur_net_local_port, "", sizeof(cur_net_local_port));                  strlcpy(cur_net_local_port, "", sizeof(cur_net_local_port));
329                  cur_net_n_remote = 0;                  cur_net_n_remote = 0;
330                  return;                  return;
# Line 397  static void parse__net(struct emul *e, F Line 399  static void parse__net(struct emul *e, F
399                  e->net = net_init(e, NET_INIT_FLAG_GATEWAY,                  e->net = net_init(e, NET_INIT_FLAG_GATEWAY,
400                      cur_net_ipv4net, atoi(cur_net_ipv4len),                      cur_net_ipv4net, atoi(cur_net_ipv4len),
401                      cur_net_remote, cur_net_n_remote,                      cur_net_remote, cur_net_n_remote,
402                      atoi(cur_net_local_port));                      atoi(cur_net_local_port), NULL);
403    
404                  if (e->net == NULL) {                  if (e->net == NULL) {
405                          fatal("line %i: fatal error: could not create"                          fatal("line %i: fatal error: could not create"
# Line 538  static void parse__machine(struct emul * Line 540  static void parse__machine(struct emul *
540                  if (cur_machine_emulated_hz[0]) {                  if (cur_machine_emulated_hz[0]) {
541                          m->emulated_hz = mystrtoull(cur_machine_emulated_hz,                          m->emulated_hz = mystrtoull(cur_machine_emulated_hz,
542                              NULL, 0);                              NULL, 0);
                         m->automatic_clock_adjustment = 0;  
543                  }                  }
544    
545                  /*  NOTE: Default nr of CPUs is 0:  */                  /*  NOTE: Default nr of CPUs is 0:  */

Legend:
Removed from v.31  
changed lines
  Added in v.32

  ViewVC Help
Powered by ViewVC 1.1.26