[CRIU] [PATCH 2/2] pie/piegen: add line break at pr_perror()

Cyrill Gorcunov gorcunov at gmail.com
Wed Feb 17 03:17:21 PST 2016


On Wed, Feb 17, 2016 at 02:03:06PM +0300, Dmitry Safonov wrote:
> On 02/17/2016 01:54 PM, Cyrill Gorcunov wrote:
> >On Wed, Feb 17, 2016 at 01:46:52PM +0300, Dmitry Safonov wrote:
> >>As no user does it explicitly, do this in define, it shall look nicer
> >>than:
> >>parasite_blob: Error (pie/piegen/main.c:121): Can't open file file.oNo such file or directory
> >>
> >>Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
> >>---
> >>  criu/pie/piegen/piegen.h | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/criu/pie/piegen/piegen.h b/criu/pie/piegen/piegen.h
> >>index 8488c0a..e4a4150 100644
> >>--- a/criu/pie/piegen/piegen.h
> >>+++ b/criu/pie/piegen/piegen.h
> >>@@ -30,6 +30,6 @@ extern int handle_elf_ppc64(void *mem, size_t size);
> >>  #define pr_debug(fmt, ...)	printf("%s: "fmt, opts.stream_name, ##__VA_ARGS__)
> >>  #define pr_err(fmt, ...)	fprintf(stderr, "%s: Error (%s:%d): "fmt, opts.stream_name, __FILE__, __LINE__, ##__VA_ARGS__)
> >>-#define pr_perror(fmt, ...)	fprintf(stderr, "%s: Error (%s:%d): "fmt "%m\n", opts.stream_name, __FILE__, __LINE__, ##__VA_ARGS__)
> >>+#define pr_perror(fmt, ...)	fprintf(stderr, "%s: Error (%s:%d): "fmt "\n%m\n", opts.stream_name, __FILE__, __LINE__, ##__VA_ARGS__)
> >No, lets don't add additional \n here. Just add a space before %m.
> Ok, maybe colon or hyphen then?

I'm fine with either.


More information about the CRIU mailing list