Ignore:
Timestamp:
May 6, 2013, 7:57:39 PM (12 years ago)
Author:
David Azarewicz
Message:

debugging updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/os2ahci.c

    r155 r156  
    4545  }
    4646
     47#define drv_parm_int_optional(s, value, type, radix) \
     48  { \
     49    char _far *_ep; \
     50    if ((s)[1] == ':') { \
     51      value = (type) strtol((s) + 2, (const char _far* _far*) &_ep, radix); \
     52      s = _ep; \
     53    } else { \
     54      value++; \
     55    } \
     56  }
     57
    4758/* set two-dimensional array of port options */
    4859#define set_port_option(opt, val)                         \
     
    8899int             init_reset = 1;    /* if != 0, reset ports during init */
    89100int             force_write_cache; /* if != 0, force write cache */
    90 int             verbosity = 1;     /* == 1 -> show sign on banner
    91                                     *  > 1 -> show adapter info during boot */
     101int             verbosity = 0;     /* default is quiet. 1=show sign on banner, >1=show adapter info during boot */
    92102int             use_lvm_info = 1;
     103int             wrap_trace_buffer = 0;
     104long            com_baud = 0;
    93105
    94106PFN             Device_Help = 0;   /* pointer to device helper entry point */
     
    243255        goto init_fail;
    244256
     257      case 'b':
     258        drv_parm_int(s, com_baud, u32, 10);
     259        break;
     260
    245261      case 'c':
    246262        /* set COM port base address for debug messages */
     
    252268      case 'd':
    253269        /* increase debug level */
    254         debug++;
     270        drv_parm_int_optional(s, debug, int, 10);
    255271        break;
    256272
     
    347363
    348364      case 'z':
     365        /* Specify to not use the LVM information. There is no reason why anyone would
     366         * want to do this, but previous versions of this driver did not have LVM capability,
     367         * so this switch is here temporarily just in case.
     368         */
    349369        use_lvm_info = !invert_option;
    350370        break;
     
    352372      case 'v':
    353373        /* be verbose during boot */
    354         verbosity++;
     374        drv_parm_int_optional(s, verbosity, int, 10);
     375        break;
     376
     377      case 'w':
     378        /* Specify to allow the trace buffer to wrap when full. */
     379        wrap_trace_buffer = !invert_option;
    355380        break;
    356381
    357382      case 'q':
    358         /* be quiet */
    359         verbosity = -1000;
     383        /* Temporarily output a non-fatal message to get anyone using this
     384         * undocumented switch to stop using it. This will be removed soon
     385         * and the error will become fatal.
     386         */
     387        cprintf("%s: unknown option: /%c\n", drv_name, *s);
    360388        break;
    361389
     
    370398  ciprintf(init_msg, drv_name, VERSION / 100, VERSION % 100);
    371399
    372 //#ifdef ECS_BUILD
    373 //  ciprintf("This driver is licensed for use only in conjunction with eComStation.\n");
    374 //#else
    375 //  ciprintf("This is the Open Watcom build.\n");
    376 //#endif
    377 
    378   if (debug) {
    379     /* initialize com port for debug output */
    380     //DAZ init_com();
    381   }
     400  if (com_baud) init_com(com_baud); /* initialize com port for debug output */
    382401
    383402  /* initialize trace buffer if applicable */
Note: See TracChangeset for help on using the changeset viewer.