diff options
author | Collin L. Walling <walling@linux.vnet.ibm.com> | 2018-02-23 10:43:10 -0500 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2018-02-26 07:56:54 +0100 |
commit | fc0e208774364c2a8013aa028b742a8dde6d2c2b (patch) | |
tree | e35f4d176dc33c79079a9a44b5d59535c4549acd /pc-bios/s390-ccw/bootmap.h | |
parent | ac4c5958b1e6165971303cb02598b190485481f5 (diff) |
s390-ccw: update libc
Moved:
memcmp from bootmap.h to libc.h (renamed from _memcmp)
strlen from sclp.c to libc.h (renamed from _strlen)
Added C standard functions:
isdigit
Added non C-standard function:
uitoa
atoui
Signed-off-by: Collin L. Walling <walling@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/bootmap.h')
-rw-r--r-- | pc-bios/s390-ccw/bootmap.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/pc-bios/s390-ccw/bootmap.h b/pc-bios/s390-ccw/bootmap.h index 4bd95cd4d2..4cf7e1e463 100644 --- a/pc-bios/s390-ccw/bootmap.h +++ b/pc-bios/s390-ccw/bootmap.h @@ -328,20 +328,6 @@ static inline bool magic_match(const void *data, const void *magic) return *((uint32_t *)data) == *((uint32_t *)magic); } -static inline int _memcmp(const void *s1, const void *s2, size_t n) -{ - int i; - const uint8_t *p1 = s1, *p2 = s2; - - for (i = 0; i < n; i++) { - if (p1[i] != p2[i]) { - return p1[i] > p2[i] ? 1 : -1; - } - } - - return 0; -} - static inline uint32_t iso_733_to_u32(uint64_t x) { return (uint32_t)x; @@ -434,7 +420,7 @@ const uint8_t vol_desc_magic[] = "CD001"; static inline bool is_iso_vd_valid(IsoVolDesc *vd) { - return !_memcmp(&vd->ident[0], vol_desc_magic, 5) && + return !memcmp(&vd->ident[0], vol_desc_magic, 5) && vd->version == 0x1 && vd->type <= VOL_DESC_TYPE_PARTITION; } |