Hello!

    Since timeout code is obsoletted, and nobody will use it anyway now
    (we have nice power button, and ^C ;) ), I made diff that 
    removes all timeout code completely. Find it attached.

    Also I have strange artifact on VGA emulated screen, I attaching
    .gif with this artifact, so you can see what I am talking about.

   Also I sometimes see segmentation faults when I press ^C,
   but I currently found no way to 100% reproduce this.

Bye,
    Oleg

GIF image data, version 87a, 471 x 458

--- ../../freemware/user/user.c Sat Jan  8 12:50:53 2000
+++ user.c      Sat Jan  8 13:34:09 2000
@@ -59,7 +59,7 @@
 {
     int fileno, virtno, ret;
     int request, data;
-    unsigned i, timeout;
+    unsigned i;
     struct stat statbuf;
     struct sigaction sg_act;
     guest_context_t context;
@@ -78,7 +78,6 @@
     strcpy(config_file_name,"fmw.conf");
     guest_file_name[0]='\0';
     dump_file_name[0]='\0';
-    timeout = 0;
     max_memory = 0;
     text_address = -1;
     data_address = -1;
@@ -94,7 +93,6 @@
       case 'h':
        printf("FreeMWare Version, hm... don't know. Following options are for 
you:\n");
        printf("-h ... Print this helpful help\n");
-       printf("-t ... Timeout (nr. of seconds the VM should run)\n");
        printf("-m ... Megs of memory for VM\n");
        printf("-f ... Config File (fully qualified path)\n");
        printf("-g ... Guest code (fully qualified path)\n");
@@ -102,9 +100,6 @@
        printf("-D ... Dump guest after running (human readable hex code)\n");
        exit(0);
        break;
-      case 't':
-       timeout = atoi(&argv[i][3]);
-       break;
       case 'm':
        max_memory = atoi(&argv[i][3]);
        break;
@@ -148,11 +143,7 @@
        line_index = 0;
        if((line[0]=='#') || (line[0]=='\n')) continue; // is a comment or a blank 
line;
        while((line[line_index] != ' ') && (line[line_index] != '=')) line_index++;
-       if(!strncmp(line,"timeout",line_index)) {
-         if(timeout != 0) {line_index=0;continue;} // command line overwrites config 
file settings;
-         while((line[line_index] == ' ') || (line[line_index] == '=')) line_index++;
-         timeout = atoi(&line[line_index]);
-       } else if(!strncmp(line,"memory",line_index)) {
+        if(!strncmp(line,"memory",line_index)) {
          if(max_memory != 0) {line_index=0;continue;} // command line overwrites 
config file settings;
          while((line[line_index] == ' ') || (line[line_index] == '=')) line_index++;
          max_memory = atoi(&line[line_index]);
@@ -193,7 +184,6 @@
       strcpy(dump_file_name,"dumpfile");
 
     if(debug_on) {
-      fprintf(stderr,"Timeout: %d\n",timeout);
       fprintf(stderr,"Memory: %d\n",max_memory);
       fprintf(stderr,"Text address: %d\n",text_address);
       fprintf(stderr,"Data address: %d\n",data_address);
@@ -293,8 +283,6 @@
       }
     }
     free(elf_buf);
-
-    fprintf(stderr, "Setting up timeout after %d seconds\n", timeout);
 
     memset(&sg_act, 0, sizeof(sg_act));
     sg_act.sa_handler = abort_handler;

Reply via email to