This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 1/2] gas/as.c: print input and output details when error
- From: "Jan Beulich" <JBeulich at suse dot com>
- To: "Robert Yang" <liezhi dot yang at windriver dot com>
- Cc: "Nick Clifton" <nickc at redhat dot com>,<binutils at sourceware dot org>
- Date: Thu, 09 Aug 2018 01:42:05 -0600
- Subject: Re: [PATCH 1/2] gas/as.c: print input and output details when error
- References: <1533786549-1931-1-git-send-email-liezhi.yang@windriver.com>
>>> On 09.08.18 at 05:49, <liezhi.yang@windriver.com> wrote:
> --- a/gas/as.c
> +++ b/gas/as.c
> @@ -1259,8 +1259,10 @@ main (int argc, char ** argv)
> if (sib.st_ino == sob.st_ino && sib.st_ino != 0)
> {
> /* Don't let as_fatal remove the output file! */
> + saved_out_file_name = xstrdup (out_file_name);
> out_file_name = NULL;
> - as_fatal (_("The input and output files must be distinct"));
> + as_fatal (_("The input (%s, ino: %ld) and output (%s, ino: %ld) files must be distinct"),
> + argv[i], sib.st_ino, saved_out_file_name, sob.st_ino);
The if() condition guarantees both ino-s to be the same - why
print the same number twice? Instead, in your next patch,
perhaps also print dev?
Jan