1// Error messages should not contain newlines.  This script finds
2// messages that do.  Fixing them is manual.
3@r@
4expression errp, eno, cls, fmt;
5position p;
6@@
7(
8error_report(fmt, ...)@p
9|
10error_setg(errp, fmt, ...)@p
11|
12error_setg_errno(errp, eno, fmt, ...)@p
13|
14error_setg_win32(errp, eno, cls, fmt, ...)@p
15|
16error_prepend(errp, fmt, ...)@p
17|
18error_setg_file_open(errp, eno, cls, fmt, ...)@p
19|
20error_reportf_err(errp, fmt, ...)@p
21|
22error_set(errp, cls, fmt, ...)@p
23)
24@script:python@
25fmt << r.fmt;
26p << r.p;
27@@
28if "\\n" in str(fmt):
29    print "%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt)
30