From: Tomohiro Kusumi Date: Fri, 10 Jun 2016 02:41:46 +0000 (+0900) Subject: sys/vfs/hammer2: Change u_int{8,16,32,64}_t to uint{8,16,32,64}_t X-Git-Tag: v4.6.0rc~194 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/2f70512b26b3ae82a252d701428d01a5f1549a99 sys/vfs/hammer2: Change u_int{8,16,32,64}_t to uint{8,16,32,64}_t hammer2 mostly uses uint{8,16,32,64}_t, so fix u_int{8,16,32,64}_t. --- diff --git a/sys/vfs/hammer2/hammer2.h b/sys/vfs/hammer2/hammer2.h index 074d38e985..623118121c 100644 --- a/sys/vfs/hammer2/hammer2.h +++ b/sys/vfs/hammer2/hammer2.h @@ -1335,11 +1335,11 @@ void hammer2_dev_unlock(hammer2_dev_t *hmp); int hammer2_get_dtype(const hammer2_inode_data_t *ipdata); int hammer2_get_vtype(uint8_t type); -u_int8_t hammer2_get_obj_type(enum vtype vtype); -void hammer2_time_to_timespec(u_int64_t xtime, struct timespec *ts); -u_int64_t hammer2_timespec_to_time(const struct timespec *ts); -u_int32_t hammer2_to_unix_xid(const uuid_t *uuid); -void hammer2_guid_to_uuid(uuid_t *uuid, u_int32_t guid); +uint8_t hammer2_get_obj_type(enum vtype vtype); +void hammer2_time_to_timespec(uint64_t xtime, struct timespec *ts); +uint64_t hammer2_timespec_to_time(const struct timespec *ts); +uint32_t hammer2_to_unix_xid(const uuid_t *uuid); +void hammer2_guid_to_uuid(uuid_t *uuid, uint32_t guid); void hammer2_trans_manage_init(hammer2_pfs_t *pmp); hammer2_key_t hammer2_dirhash(const unsigned char *name, size_t len); diff --git a/sys/vfs/hammer2/hammer2_subr.c b/sys/vfs/hammer2/hammer2_subr.c index 6857d0148d..d7cc3eedae 100644 --- a/sys/vfs/hammer2/hammer2_subr.c +++ b/sys/vfs/hammer2/hammer2_subr.c @@ -136,7 +136,7 @@ hammer2_get_vtype(uint8_t type) /* not reached */ } -u_int8_t +uint8_t hammer2_get_obj_type(enum vtype vtype) { switch(vtype) { @@ -164,16 +164,16 @@ hammer2_get_obj_type(enum vtype vtype) * Convert a hammer2 64-bit time to a timespec. */ void -hammer2_time_to_timespec(u_int64_t xtime, struct timespec *ts) +hammer2_time_to_timespec(uint64_t xtime, struct timespec *ts) { ts->tv_sec = (unsigned long)(xtime / 1000000); ts->tv_nsec = (unsigned int)(xtime % 1000000) * 1000L; } -u_int64_t +uint64_t hammer2_timespec_to_time(const struct timespec *ts) { - u_int64_t xtime; + uint64_t xtime; xtime = (unsigned)(ts->tv_nsec / 1000) + (unsigned long)ts->tv_sec * 1000000ULL; @@ -183,17 +183,17 @@ hammer2_timespec_to_time(const struct timespec *ts) /* * Convert a uuid to a unix uid or gid */ -u_int32_t +uint32_t hammer2_to_unix_xid(const uuid_t *uuid) { - return(*(const u_int32_t *)&uuid->node[2]); + return(*(const uint32_t *)&uuid->node[2]); } void -hammer2_guid_to_uuid(uuid_t *uuid, u_int32_t guid) +hammer2_guid_to_uuid(uuid_t *uuid, uint32_t guid) { bzero(uuid, sizeof(*uuid)); - *(u_int32_t *)&uuid->node[2] = guid; + *(uint32_t *)&uuid->node[2] = guid; } /* diff --git a/sys/vfs/hammer2/hammer2_vnops.c b/sys/vfs/hammer2/hammer2_vnops.c index d7c8199a92..12e44feea8 100644 --- a/sys/vfs/hammer2/hammer2_vnops.c +++ b/sys/vfs/hammer2/hammer2_vnops.c @@ -366,7 +366,7 @@ hammer2_vop_setattr(struct vop_setattr_args *ap) error = 0; if (vap->va_flags != VNOVAL) { - u_int32_t flags; + uint32_t flags; flags = ip->meta.uflags; error = vop_helper_setattr_flags(&flags, vap->va_flags,