linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Subject: Re: [PATCH] libext2fs: fix build errors on bigendian hosts
Date: Tue, 8 Apr 2014 19:36:25 +0800	[thread overview]
Message-ID: <20140408113625.GB23533@gmail.com> (raw)
In-Reply-To: <1395915444-2225-1-git-send-email-guaneryu@gmail.com>

On Thu, Mar 27, 2014 at 06:17:24PM +0800, Eryu Guan wrote:
> Fix the following build errors on bigendian hosts.
> 
> - ctx is a pointer, use '->' not '.'
> - add missing argument to ext2fs_dirent_swab_in2
> 
> make[2]: Entering directory `/root/e2fsprogs/lib/ext2fs'
>         CC inline_data.c
> inline_data.c: In function ‘ext2fs_inline_data_dir_iterate’:
> inline_data.c:221:5: error: request for member ‘errcode’ in something not a structure or union
>   ctx.errcode = ext2fs_dirent_swab_in2(fs, ctx->buf, ctx->buflen, 0);
>      ^
> inline_data.c:222:9: error: request for member ‘errcode’ in something not a structure or union
>   if (ctx.errcode) {
>          ^
> inline_data.c: In function ‘ext2fs_inline_data_dir_expand’:
> inline_data.c:364:2: error: too few arguments to function ‘ext2fs_dirent_swab_in2’
>   retval = ext2fs_dirent_swab_in2(fs, buf, size);
>   ^
> In file included from inline_data.c:19:0:
> ext2fs.h:1569:18: note: declared here
>  extern errcode_t ext2fs_dirent_swab_in2(ext2_filsys fs, char *buf, size_t size,
>                   ^
> make[2]: *** [inline_data.o] Error 1
> 
> Cc: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Eryu Guan <guaneryu@gmail.com>

Sorry for the late reply, and thanks for fixing this.

Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>

                                                - Zheng

> ---
>  lib/ext2fs/inline_data.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/ext2fs/inline_data.c b/lib/ext2fs/inline_data.c
> index 7be0f96..7a81da0 100644
> --- a/lib/ext2fs/inline_data.c
> +++ b/lib/ext2fs/inline_data.c
> @@ -218,8 +218,8 @@ int ext2fs_inline_data_dir_iterate(ext2_filsys fs, ext2_ino_t ino,
>  	ctx->buf = data.ea_data;
>  	ctx->buflen = data.ea_size;
>  #ifdef WORDS_BIGENDIAN
> -	ctx.errcode = ext2fs_dirent_swab_in2(fs, ctx->buf, ctx->buflen, 0);
> -	if (ctx.errcode) {
> +	ctx->errcode = ext2fs_dirent_swab_in2(fs, ctx->buf, ctx->buflen, 0);
> +	if (ctx->errcode) {
>  		ret |= BLOCK_ABORT;
>  		goto out;
>  	}
> @@ -361,7 +361,7 @@ ext2fs_inline_data_dir_expand(ext2_filsys fs, ext2_ino_t ino,
>  		return retval;
>  
>  #ifdef WORDS_BIGENDIAN
> -	retval = ext2fs_dirent_swab_in2(fs, buf, size);
> +	retval = ext2fs_dirent_swab_in2(fs, buf, size, 0);
>  	if (retval)
>  		goto errout;
>  #endif
> -- 
> 1.9.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-04-08 11:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 10:17 [PATCH] libext2fs: fix build errors on bigendian hosts Eryu Guan
2014-04-08 11:36 ` Zheng Liu [this message]
2014-04-08 18:34   ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140408113625.GB23533@gmail.com \
    --to=gnehzuil.liu@gmail.com \
    --cc=guaneryu@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).