mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-07-08 17:56:11 +00:00
put hex_to_bin back
This commit is contained in:
@@ -2829,8 +2829,8 @@ void AtoH(char *src, u8 *dest, int destlen)
|
||||
destTemp = (u8 *)dest;
|
||||
|
||||
while (destlen--) {
|
||||
*destTemp = hex_to_bin_old(*srcptr++) << 4; /* Put 1st ascii byte in upper nibble. */
|
||||
*destTemp += hex_to_bin_old(*srcptr++); /* Add 2nd ascii byte to above. */
|
||||
*destTemp = hex_to_bin(*srcptr++) << 4; /* Put 1st ascii byte in upper nibble. */
|
||||
*destTemp += hex_to_bin(*srcptr++); /* Add 2nd ascii byte to above. */
|
||||
destTemp++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
||||
return buf;
|
||||
}
|
||||
|
||||
extern int hex_to_bin_old(char ch);
|
||||
extern int hex_to_bin(char ch);
|
||||
|
||||
#ifndef pr_fmt
|
||||
#define pr_fmt(fmt) fmt
|
||||
|
||||
@@ -16,13 +16,13 @@ const char hex_asc[] = "0123456789abcdef";
|
||||
EXPORT_SYMBOL(hex_asc);
|
||||
|
||||
/**
|
||||
* hex_to_bin_old - convert a hex digit to its real value
|
||||
* hex_to_bin - convert a hex digit to its real value
|
||||
* @ch: ascii character represents hex digit
|
||||
*
|
||||
* hex_to_bin_old() converts one hex digit to its actual value or -1 in case of bad
|
||||
* hex_to_bin() converts one hex digit to its actual value or -1 in case of bad
|
||||
* input.
|
||||
*/
|
||||
int hex_to_bin_old(char ch)
|
||||
int hex_to_bin(char ch)
|
||||
{
|
||||
if ((ch >= '0') && (ch <= '9'))
|
||||
return ch - '0';
|
||||
@@ -31,7 +31,7 @@ int hex_to_bin_old(char ch)
|
||||
return ch - 'a' + 10;
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(hex_to_bin_old);
|
||||
EXPORT_SYMBOL(hex_to_bin);
|
||||
|
||||
/**
|
||||
* hex_dump_to_buffer - convert a blob of data to "hex ASCII" in memory
|
||||
|
||||
Reference in New Issue
Block a user