Re: [PATCH v3 1/2] btrfs-progs: Introduce warning and error for common use

2015-09-30 Thread David Sterba
On Mon, Sep 28, 2015 at 09:58:13PM +0800, Zhao Lei wrote: > And sometimes, we forgot add tailed '\n', This is actually a good point and we don't need to put the trailing newline to all the messages, similar to the btrfs_* macros used in kernel. I'll update the patches. -- To unsubscribe from this

[PATCH v3 1/2] btrfs-progs: Introduce warning and error for common use

2015-09-28 Thread Zhao Lei
Current code use fprintf(stderr, "...") to output warnning and error information. The error message have different style, as: # grep fprintf *.c fprintf(stderr, "Open ctree failed\n"); fprintf(stderr, "%s: open ctree failed\n", __func__); fprintf(stderr, "ERROR: cannot open ctree\n"); ...