6060#include  "config.h" 
6161#include  "types.h" 
6262#include  "util.h" 
63+ #include  "dmidecode.h" 
6364#include  "dmiopt.h" 
6465
6566static  const  char  * out_of_spec  =  "<OUT OF SPEC>" ;
@@ -314,7 +315,7 @@ static void dmi_bios_characteristics_x2(u8 code, const char *prefix)
314315 * 3.3.2 System Information (Type 1) 
315316 */ 
316317
317- static   void  dmi_system_uuid (u8  * p )
318+ void  dmi_system_uuid (u8  * p )
318319{
319320	int  only0xFF = 1 , only0x00 = 1 ;
320321	int  i ;
@@ -327,16 +328,16 @@ static void dmi_system_uuid(u8 *p)
327328
328329	if (only0xFF )
329330	{
330- 		printf ("  Not Present" );
331+ 		printf ("Not Present" );
331332		return ;
332333	}
333334	if (only0x00 )
334335	{
335- 		printf ("  Not Settable" );
336+ 		printf ("Not Settable" );
336337		return ;
337338	}
338339
339- 	printf ("  %02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X" ,
340+ 	printf ("%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X" ,
340341		p [0 ], p [1 ], p [2 ], p [3 ], p [4 ], p [5 ], p [6 ], p [7 ],
341342		p [8 ], p [9 ], p [10 ], p [11 ], p [12 ], p [13 ], p [14 ], p [15 ]);
342343}
@@ -429,7 +430,7 @@ static void dmi_base_board_handles(u8 count, u8 *p, const char *prefix)
429430 * 3.3.4 Chassis Information (Type 3) 
430431 */ 
431432
432- static   const  char  * dmi_chassis_type (u8  code )
433+ const  char  * dmi_chassis_type (u8  code )
433434{
434435	/* 3.3.4.1 */ 
435436	static  const  char  * type []= {
@@ -568,7 +569,7 @@ static const char *dmi_processor_type(u8 code)
568569	return  out_of_spec ;
569570}
570571
571- static   const  char  * dmi_processor_family (u8  code )
572+ const  char  * dmi_processor_family (u8  code )
572573{
573574	/* 3.3.5.2 */ 
574575	static  const  char  * family [256 ]= {
@@ -1002,12 +1003,14 @@ static void dmi_processor_voltage(u8 code)
10021003	}
10031004}
10041005
1005- static   void  dmi_processor_frequency (u16   code )
1006+ void  dmi_processor_frequency (u8   * p )
10061007{
1008+ 	u16  code  =  WORD (p );
1009+ 
10071010	if (code )
1008- 		printf ("  %u MHz" , code );
1011+ 		printf ("%u MHz" , code );
10091012	else 
1010- 		printf ("  Unknown" );
1013+ 		printf ("Unknown" );
10111014}
10121015
10131016static  const  char  * dmi_processor_status (u8  code )
@@ -2878,7 +2881,7 @@ static void dmi_decode(u8 *data, u16 ver)
28782881			printf ("\tSerial Number: %s\n" ,
28792882				dmi_string (h , data [0x07 ]));
28802883			if (h -> length < 0x19 ) break ;
2881- 			printf ("\tUUID:" );
2884+ 			printf ("\tUUID:  " );
28822885			dmi_system_uuid (data + 0x08 );
28832886			printf ("\n" );
28842887			printf ("\tWake-up Type: %s\n" ,
@@ -2973,14 +2976,14 @@ static void dmi_decode(u8 *data, u16 ver)
29732976			printf ("\tVoltage:" );
29742977			dmi_processor_voltage (data [0x11 ]);
29752978			printf ("\n" );
2976- 			printf ("\tExternal Clock:" );
2977- 			dmi_processor_frequency (WORD ( data + 0x12 ) );
2979+ 			printf ("\tExternal Clock:  " );
2980+ 			dmi_processor_frequency (data + 0x12 );
29782981			printf ("\n" );
2979- 			printf ("\tMax Speed:" );
2980- 			dmi_processor_frequency (WORD ( data + 0x14 ) );
2982+ 			printf ("\tMax Speed:  " );
2983+ 			dmi_processor_frequency (data + 0x14 );
29812984			printf ("\n" );
2982- 			printf ("\tCurrent Speed:" );
2983- 			dmi_processor_frequency (WORD ( data + 0x16 ) );
2985+ 			printf ("\tCurrent Speed:  " );
2986+ 			dmi_processor_frequency (data + 0x16 );
29842987			printf ("\n" );
29852988			if (data [0x18 ]& (1 <<6 ))
29862989				printf ("\tStatus: Populated, %s\n" ,
0 commit comments