[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libfsimage: zfs build fix for NetBSD
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1271330656 -3600 # Node ID 960ed5e75e64af0e3207039c3f0243ebafeb814a # Parent 9d5ecf79f1b51bbf2979b6f2830868e50acd3419 libfsimage: zfs build fix for NetBSD uchar_t is not defined because both FSYS_ZFS and FSIMAGE are defined at build time. Also fix warnings with ctype. Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx> --- tools/libfsimage/zfs/fsys_zfs.c | 16 ++++++++-------- tools/libfsimage/zfs/zfs_lzjb.c | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff -r 9d5ecf79f1b5 -r 960ed5e75e64 tools/libfsimage/zfs/fsys_zfs.c --- a/tools/libfsimage/zfs/fsys_zfs.c Thu Apr 15 12:21:00 2010 +0100 +++ b/tools/libfsimage/zfs/fsys_zfs.c Thu Apr 15 12:24:16 2010 +0100 @@ -80,8 +80,8 @@ static int static int zfs_bcmp(const void *s1, const void *s2, size_t n) { - const uchar_t *ps1 = s1; - const uchar_t *ps2 = s2; + const uint8_t *ps1 = s1; + const uint8_t *ps2 = s2; if (s1 != s2 && n != 0) { do { @@ -802,11 +802,11 @@ dnode_get_path(dnode_phys_t *mdn, char * while (*path == '/') path++; - while (*path && !isspace(*path)) { + while (*path && !isspace((uint8_t)*path)) { /* get the next component name */ cname = path; - while (*path && !isspace(*path) && *path != '/') + while (*path && !isspace((uint8_t)*path) && *path != '/') path++; ch = *path; *path = 0; /* ensure null termination */ @@ -914,23 +914,23 @@ get_objset_mdn(dnode_phys_t *mosmdn, cha } /* take out the pool name */ - while (*fsname && !isspace(*fsname) && *fsname != '/') + while (*fsname && !isspace((uint8_t)*fsname) && *fsname != '/') fsname++; - while (*fsname && !isspace(*fsname)) { + while (*fsname && !isspace((uint8_t)*fsname)) { uint64_t childobj; while (*fsname == '/') fsname++; cname = fsname; - while (*fsname && !isspace(*fsname) && *fsname != '/') + while (*fsname && !isspace((uint8_t)*fsname) && *fsname != '/') fsname++; ch = *fsname; *fsname = 0; snapname = cname; - while (*snapname && !isspace(*snapname) && *snapname != '@') + while (*snapname && !isspace((uint8_t)*snapname) && *snapname != '@') snapname++; if (*snapname == '@') { issnapshot = 1; diff -r 9d5ecf79f1b5 -r 960ed5e75e64 tools/libfsimage/zfs/zfs_lzjb.c --- a/tools/libfsimage/zfs/zfs_lzjb.c Thu Apr 15 12:21:00 2010 +0100 +++ b/tools/libfsimage/zfs/zfs_lzjb.c Thu Apr 15 12:24:16 2010 +0100 @@ -34,10 +34,10 @@ int int lzjb_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len) { - uchar_t *src = s_start; - uchar_t *dst = d_start; - uchar_t *d_end = (uchar_t *)d_start + d_len; - uchar_t *cpy, copymap = '\0'; + uint8_t *src = s_start; + uint8_t *dst = d_start; + uint8_t *d_end = (uint8_t *)d_start + d_len; + uint8_t *cpy, copymap = '\0'; int copymask = 1 << (NBBY - 1); while (dst < d_end) { @@ -49,7 +49,7 @@ lzjb_decompress(void *s_start, void *d_s int mlen = (src[0] >> (NBBY - MATCH_BITS)) + MATCH_MIN; int offset = ((src[0] << NBBY) | src[1]) & OFFSET_MASK; src += 2; - if ((cpy = dst - offset) < (uchar_t *)d_start) + if ((cpy = dst - offset) < (uint8_t *)d_start) return (-1); while (--mlen >= 0 && dst < d_end) *dst++ = *cpy++; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |