From dd8d2a03dfb73999a781cde427734381434ad9a1 Mon Sep 17 00:00:00 2001 From: Alexander Polakov Date: Wed, 9 Sep 2009 13:43:08 +0400 Subject: [PATCH] Revert "Move isonum_ declaration to iso.h" This reverts commit f5ff88dca23b1b8f4b9287fb7c59959eb976a808. It broke sysutils/hal and maybe something else. Requested-by: Hasso Tepper --- lib/libstand/cd9660.c | 13 +++++++++++++ sys/vfs/isofs/cd9660/iso.h | 30 +----------------------------- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/lib/libstand/cd9660.c b/lib/libstand/cd9660.c index 8f2a990f3a..77ceb2c590 100644 --- a/lib/libstand/cd9660.c +++ b/lib/libstand/cd9660.c @@ -117,6 +117,19 @@ struct ptable_ent { #define cdb2devb(bno) ((bno) * ISO_DEFAULT_BLOCK_SIZE / DEV_BSIZE) +/* XXX these should be in the system headers */ +static __inline int +isonum_722(u_char *p) +{ + return (*p << 8)|p[1]; +} + +static __inline int +isonum_732(u_char *p) +{ + return (*p << 24)|(p[1] << 16)|(p[2] << 8)|p[3]; +} + static ISO_SUSP_HEADER * susp_lookup_record(struct open_file *f, const char *identifier, struct iso_directory_record *dp, int lenskip) diff --git a/sys/vfs/isofs/cd9660/iso.h b/sys/vfs/isofs/cd9660/iso.h index 15969d7e01..e66dea3b8d 100644 --- a/sys/vfs/isofs/cd9660/iso.h +++ b/sys/vfs/isofs/cd9660/iso.h @@ -292,23 +292,7 @@ isonum_712(unsigned char *p) return p[0]; } -static __inline uint8_t -isonum_713(unsigned char *p) -{ - return p[0]; -} - -static __inline uint16_t -isonum_721(unsigned char *p) -{ - return (p[0] | p[1] << 8); -} - -static __inline uint16_t -isonum_722(unsigned char *p) -{ - return (p[1] | p[0] << 8); -} +#ifndef UNALIGNED_ACCESS static __inline uint16_t isonum_723(unsigned char *p) @@ -316,18 +300,6 @@ isonum_723(unsigned char *p) return (p[0] | p[1] << 8); } -#ifndef UNALIGNED_ACCESS - -static __inline uint32_t -isonum_731(unsigned char *p) -{ - return (p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24); -} -static __inline uint32_t -isonum_732(unsigned char *p) -{ - return (p[3] | p[2] << 8 | p[1] << 16 | p[0] << 24); -} static __inline uint32_t isonum_733(unsigned char *p) { -- 2.41.0