Bug 28027 - abilint: "Unknown file type given in input" error message has no end of line character (LF)
Summary: abilint: "Unknown file type given in input" error message has no end of line ...
Status: UNCONFIRMED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P3 minor
Target Milestone: ---
Assignee: dodji
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-30 07:41 UTC by Paul Wise
Modified: 2021-06-30 07:41 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Wise 2021-06-30 07:41:43 UTC
I noticed while playing with abilint that the "Unknown file type given in input" error message has no end of line character (LF or \n), so if you are passing multiple files to abilint via xargs, you get all the output on one line. As far as I can tell all the other errors printed by abilint contain and end of line character (\n).

$ echo foo > foo
$ abilint --noout foo |& hd
00000000  61 62 69 6c 69 6e 74 3a  20 55 6e 6b 6e 6f 77 6e  |abilint: Unknown|
00000010  20 66 69 6c 65 20 74 79  70 65 20 67 69 76 65 6e  | file type given|
00000020  20 69 6e 20 69 6e 70 75  74 3a 20 66 6f 6f        | in input: foo|
0000002e
$ echo foo | hd
00000000  66 6f 6f 0a                                       |foo.|
00000004

$ grep -B2 -A1 'Unknown file type given in input' tools/abilint.cc
	case abigail::tools_utils::FILE_TYPE_UNKNOWN:
	  emit_prefix(argv[0], cerr)
	    << "Unknown file type given in input: " << opts.file_path;
	  return 1;