kernels/linux-2.4.0/arch/ia64/sn/io/eeprom.c
/* create a six-character serial number */
create a six-character serial number
create a six - character serial number
void fake_a_serial_number( char *buf, uint64_t ser )
{
    int i;
    static const char hexchars[] = "0123456789ABCDEF";
    if (ser) {
	for( i = 5; i >=0; i-- ) {
	    buf[i] = hexchars[ser & 0xf];
	    ser >>= 4;
	}
    }
    else {
	for( i = 0; i < 6; i++ )
	    buf[i] = random_eeprom_ch(0);
    }
}
void fake_a_serial_number ( char * buf , uint64_t ser ) { int i ; static const char hexchars [ ] = " " ; if ( ser ) { for ( i = 5 ; i >= 0 ; i -- ) { buf [ i ] = hexchars [ ser & 0xf ] ; ser >>= 4 ; } } else { for ( i = 0 ; i < 6 ; i ++ ) buf [ i ] = random_eeprom_ch ( 0 ) ; } }
create a six-character serial number
create a six - character serial number