diff options
author | Cristian RodrÃguez <crrodriguez@opensuse.org> | 2013-12-02 23:06:23 -0300 |
---|---|---|
committer | Cristian RodrÃguez <crrodriguez@opensuse.org> | 2013-12-02 23:06:23 -0300 |
commit | f215e3f20431d08ab63fe6674db459dbeb18bedf (patch) | |
tree | b3d5f5824ac5f97b4a1011397f4006b826117e64 | |
parent | 8fa46f9dc1c0f5e4367eb9258aa509bc65c842b3 (diff) | |
download | quota-tools-f215e3f20431d08ab63fe6674db459dbeb18bedf.tar.gz |
__cpu_to_le16 --> htole16
-rw-r--r-- | quotaio_tree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/quotaio_tree.c b/quotaio_tree.c index 3922951..91eabb1 100644 --- a/quotaio_tree.c +++ b/quotaio_tree.c @@ -12,7 +12,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <asm/byteorder.h> +#include <endian.h> #include "pot.h" #include "common.h" @@ -109,7 +109,7 @@ static void put_free_dqblk(struct quota_handle *h, dqbuf_t buf, uint blk) dh->dqdh_next_free = htole32(info->dqi_free_blk); dh->dqdh_prev_free = htole32(0); - dh->dqdh_entries = __cpu_to_le16(0); + dh->dqdh_entries = htole16(0); info->dqi_free_blk = blk; mark_quotafile_info_dirty(h); write_blk(h, blk, buf); @@ -192,7 +192,7 @@ static uint find_free_dqentry(struct quota_handle *h, struct dquot *dquot, int * } if (le16toh(dh->dqdh_entries) + 1 >= qtree_dqstr_in_blk(info)) /* Block will be full? */ remove_free_dqentry(h, buf, blk); - dh->dqdh_entries = __cpu_to_le16(le16toh(dh->dqdh_entries) + 1); + dh->dqdh_entries = htole16(le16toh(dh->dqdh_entries) + 1); /* Find free structure in block */ ddquot = buf + sizeof(struct qt_disk_dqdbheader); for (i = 0; @@ -292,7 +292,7 @@ static void free_dqentry(struct quota_handle *h, struct dquot *dquot, uint blk) (uint) (dquot->dq_dqb.u.v2_mdqb.dqb_off >> QT_BLKSIZE_BITS)); read_blk(h, blk, buf); dh = (struct qt_disk_dqdbheader *)buf; - dh->dqdh_entries = __cpu_to_le16(le16toh(dh->dqdh_entries) - 1); + dh->dqdh_entries = htole16(le16toh(dh->dqdh_entries) - 1); if (!le16toh(dh->dqdh_entries)) { /* Block got free? */ remove_free_dqentry(h, buf, blk); put_free_dqblk(h, buf, blk); |