Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/libbb/speed_table.c

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

revision 532 by niro, Sat Sep 1 22:45:15 2007 UTC revision 816 by niro, Fri Apr 24 18:33:46 2009 UTC
# Line 54  static const struct speed_map speeds[] = Line 54  static const struct speed_map speeds[] =
54  #endif  #endif
55  };  };
56    
57  enum { NUM_SPEEDS = (sizeof(speeds) / sizeof(struct speed_map)) };  enum { NUM_SPEEDS = ARRAY_SIZE(speeds) };
58    
59  unsigned int tty_baud_to_value(speed_t speed)  unsigned FAST_FUNC tty_baud_to_value(speed_t speed)
60  {  {
61   int i = 0;   int i = 0;
62    
# Line 72  unsigned int tty_baud_to_value(speed_t s Line 72  unsigned int tty_baud_to_value(speed_t s
72   return 0;   return 0;
73  }  }
74    
75  speed_t tty_value_to_baud(unsigned int value)  speed_t FAST_FUNC tty_value_to_baud(unsigned int value)
76  {  {
77   int i = 0;   int i = 0;
78    
# Line 94  int main(void) Line 94  int main(void)
94   unsigned long v;   unsigned long v;
95   speed_t s;   speed_t s;
96    
97   for (v = 0 ; v < 500000 ; v++) {   for (v = 0 ; v < 500000; v++) {
98   s = tty_value_to_baud(v);   s = tty_value_to_baud(v);
99   if (s == (speed_t) -1) {   if (s == (speed_t) -1) {
100   continue;   continue;
# Line 104  int main(void) Line 104  int main(void)
104    
105   printf("-------------------------------\n");   printf("-------------------------------\n");
106    
107   for (s = 0 ; s < 010017+1 ; s++) {   for (s = 0 ; s < 010017+1; s++) {
108   v = tty_baud_to_value(s);   v = tty_baud_to_value(s);
109   if (!v) {   if (!v) {
110   continue;   continue;

Legend:
Removed from v.532  
changed lines
  Added in v.816