From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: guaneryu@gmail.com, fstests@vger.kernel.org
Subject: Re: [PATCH v3] generic/486: Get rid of the redundant error=%d printing
Date: Thu, 17 May 2018 07:55:43 -0700 [thread overview]
Message-ID: <20180517145543.GE4910@magnolia> (raw)
In-Reply-To: <1526527947-4905-1-git-send-email-yangx.jy@cn.fujitsu.com>
On Thu, May 17, 2018 at 11:32:27AM +0800, Xiao Yang wrote:
> 1) Without the fix, perror() can indicate the actual error(ENODATA).
> 2) After calling perror() and redirecting the output of perror()
> to a file, errno seems to be set to EINVAL unexpectedly.
> See the following mail for detailed info:
> https://www.spinics.net/lists/fstests/msg09675.html
>
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> src/attr_replace_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/attr_replace_test.c b/src/attr_replace_test.c
> index 23adc07..0720bfd 100644
> --- a/src/attr_replace_test.c
> +++ b/src/attr_replace_test.c
> @@ -11,7 +11,7 @@
> #include <sys/stat.h>
>
> #define die() do { perror(""); \
> -fprintf(stderr, "error=%d at line %d\n", errno, __LINE__); \
> +fprintf(stderr, "error at line %d\n", __LINE__); \
> exit(1); } while (0)
>
> #define fail(...) do { \
> --
> 1.8.3.1
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2018-05-17 14:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-16 8:00 [PATCH] generic/486: print correct errno Xiao Yang
2018-05-16 15:27 ` Darrick J. Wong
2018-05-17 1:36 ` [PATCH] generic/486: Get rid of the redundant error=%d printing Xiao Yang
2018-05-17 3:16 ` Eryu Guan
2018-05-17 3:25 ` Xiao Yang
2018-05-17 3:32 ` [PATCH v3] " Xiao Yang
2018-05-17 14:55 ` Darrick J. Wong [this message]
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=20180517145543.GE4910@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=yangx.jy@cn.fujitsu.com \
/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