Changes between Version 11 and Version 12 of jazz/09-05-08


Ignore:
Timestamp:
May 8, 2009, 5:29:32 PM (15 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/09-05-08

    v11 v12  
    33 * [午餐] [http://www.ipeen.com.tw/shop/shop.php?id=15102 聯合泰國小吃店]
    44
    5  * 拉票喔!! SourceForge 2009 Community Choice Awards[[BR]][[Image(sf.net_cca09.jpg, width=400)]]
     5 * 拉票喔!! !SourceForge 2009 Community Choice Awards[[BR]][[Image(sf.net_cca09.jpg, width=400)]]
    66
    77== File System : Lustre ==
     
    5353{
    5454  static int iopldone = 0;
    55 
    56 #ifdef DEBUG
    57   printf("inportb(0x%04x)\n", port);
    58 #endif
     55  unsigned int val=0;
    5956
    6057  if (port > 1024) {
    6158    if (!iopldone && iopl(3)) {
    62           fprintf(stderr, "iopl(): %s\n", strerror(errno));
    63           return 1;
     59      fprintf(stderr, " iopl(): %s\n", strerror(errno));
     60      return 0;
    6461    }
    6562    iopldone++;
    6663  } else if (ioperm(port,size,1)) {
    67     fprintf(stderr, "ioperm(%x): %s\n", port, strerror(errno));
    68     return 1;
     64    fprintf(stderr, " ioperm(%x): %s\n", port, strerror(errno));
     65    return 0;
    6966  }
    7067
    71   if (size == 4)
    72     return inl(port);
    73   else if (size == 2)
    74     return inw(port) & 0xffff;
    75   else
    76     return inb(port) & 0xff;
     68  if (size == 4) {
     69    val=inl(port);
     70#ifdef DEBUG
     71    printf("Read_port:(0x%04x)=>0x%08x\n", port, val);
     72#endif
     73  } else if (size == 2) {
     74    val=inw(port);
     75#ifdef DEBUG
     76    printf("Read_port:(0x%04x)=>0x%04x\n", port, val);
     77#endif
     78  } else {
     79    val=inb(port);
     80#ifdef DEBUG
     81    printf("Read_port:(0x%04x)=>0x%02x\n", port, val);
     82#endif
     83  }
     84  return(val);
    7785}
    7886}}}