diff options
Diffstat (limited to 'usr/src/cmd/etdump/etdump.c')
-rw-r--r-- | usr/src/cmd/etdump/etdump.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/src/cmd/etdump/etdump.c b/usr/src/cmd/etdump/etdump.c index 5469597151..60b2c332b1 100644 --- a/usr/src/cmd/etdump/etdump.c +++ b/usr/src/cmd/etdump/etdump.c @@ -33,6 +33,7 @@ #include <string.h> #include <errno.h> #include <sys/queue.h> +#include <endian.h> #include <sys/fs/hsfs_isospec.h> #include "cd9660_eltorito.h" @@ -42,6 +43,16 @@ #define ISO_DEFAULT_BLOCK_SHIFT 11 #define ISO_DEFAULT_BLOCK_SIZE (1 << ISO_DEFAULT_BLOCK_SHIFT) +/* Little endian */ +void +cd9660_721(uint16_t w, unsigned char *twochar) +{ +#if BYTE_ORDER == BIG_ENDIAN + w = htole16(w); +#endif + memcpy(twochar, &w, 2); +} + const char * system_id_string(uchar_t system_id) { |