/[grub]/grub/stage2/serial.c
ViewVC logotype

Diff of /grub/stage2/serial.c

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

revision 1.3 by okuji, Sat Aug 26 17:36:07 2000 UTC revision 1.4 by okuji, Sat Oct 13 12:02:30 2001 UTC
# Line 1  Line 1 
1  /* serial.c - serial device interface */  /* serial.c - serial device interface */
2  /*  /*
3   *  GRUB  --  GRand Unified Bootloader   *  GRUB  --  GRand Unified Bootloader
4   *  Copyright (C) 2000  Free Software Foundation, Inc.   *  Copyright (C) 2000, 2001  Free Software Foundation, Inc.
5   *   *
6   *  This program is free software; you can redistribute it and/or modify   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 31  struct divisor Line 31  struct divisor
31  };  };
32    
33  /* Store the port number of a serial unit.  */  /* Store the port number of a serial unit.  */
34  static unsigned short serial_port;  static unsigned short serial_port = -1;
35    
36  /* The table which lists common configurations.  */  /* The table which lists common configurations.  */
37  static struct divisor divisor_tab[] =  static struct divisor divisor_tab[] =
# Line 102  serial_putchar (int c) Line 102  serial_putchar (int c)
102    outb (serial_port + UART_TX, c);    outb (serial_port + UART_TX, c);
103  }  }
104    
105    /* Check if a serial port is set up.  */
106    int
107    serial_exists (void)
108    {
109      return serial_port != -1;
110    }
111    
112  /* Return the port number for the UNITth serial device.  */  /* Return the port number for the UNITth serial device.  */
113  unsigned short  unsigned short
114  serial_get_port (int unit)  serial_get_port (int unit)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26