mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
pc-bios/s390-ccw: Make ebcdic/ascii conversion public
Make the ebcdic_to_ascii function public to the rest of the "bios" code, as the volume label is no more the single thing to be converted. Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
parent
5559716c98
commit
cfe2124a7f
3 changed files with 24 additions and 22 deletions
|
@ -264,28 +264,6 @@ typedef enum {
|
|||
|
||||
/* utility code below */
|
||||
|
||||
static const unsigned char ebc2asc[256] =
|
||||
/* 0123456789abcdef0123456789abcdef */
|
||||
"................................" /* 1F */
|
||||
"................................" /* 3F */
|
||||
" ...........<(+|&.........!$*);." /* 5F first.chr.here.is.real.space */
|
||||
"-/.........,%_>?.........`:#@'=\""/* 7F */
|
||||
".abcdefghi.......jklmnopqr......" /* 9F */
|
||||
"..stuvwxyz......................" /* BF */
|
||||
".ABCDEFGHI.......JKLMNOPQR......" /* DF */
|
||||
"..STUVWXYZ......0123456789......";/* FF */
|
||||
|
||||
static inline void ebcdic_to_ascii(const char *src,
|
||||
char *dst,
|
||||
unsigned int size)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < size; i++) {
|
||||
unsigned c = src[i];
|
||||
dst[i] = ebc2asc[c];
|
||||
}
|
||||
}
|
||||
|
||||
static inline void print_volser(const void *volser)
|
||||
{
|
||||
char ascii[8];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue