Lines 92-104
static void init_bus_types() {
Link Here
|
92 |
*******************************************************/ |
92 |
*******************************************************/ |
93 |
|
93 |
|
94 |
int value_to_unit(struct disk *dsk) { |
94 |
int value_to_unit(struct disk *dsk) { |
|
|
95 |
unsigned char dsk_unit = 'C'; |
96 |
|
97 |
if (dsk->db_entry) |
98 |
dsk_unit = dsk->db_entry->unit; |
95 |
switch(unit) { |
99 |
switch(unit) { |
96 |
case CELSIUS: |
100 |
case CELSIUS: |
97 |
if(dsk->db_entry->unit == 'F') |
101 |
if(dsk_unit == 'F') |
98 |
return F_to_C(dsk->value); |
102 |
return F_to_C(dsk->value); |
99 |
break; |
103 |
break; |
100 |
case FAHRENHEIT: |
104 |
case FAHRENHEIT: |
101 |
if(dsk->db_entry->unit == 'C') |
105 |
if(dsk_unit == 'C') |
102 |
return C_to_F(dsk->value); |
106 |
return C_to_F(dsk->value); |
103 |
default: |
107 |
default: |
104 |
break; |
108 |
break; |
105 |
- |
|
|