linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] btrfs-progs: improve troubleshooting avoid duplicate error strings
@ 2015-04-13 12:37 Anand Jain
  2015-04-13 13:40 ` Marc MERLIN
  2015-04-14 13:14 ` David Sterba
  0 siblings, 2 replies; 5+ messages in thread
From: Anand Jain @ 2015-04-13 12:37 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dsterba

my troubleshooting experience says have unique error string per module.

In the below eg, its one additional step to know error line,

cat -n cmds-device.c | egrep "error removing the device"
   185	"ERROR: error removing the device '%s' - %s\n",
   190	"ERROR: error removing the device '%s' - %s\n",

which is completely avoidable.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmds-device.c b/cmds-device.c
index 1c72e90..1c32771 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -187,7 +187,7 @@ static int cmd_rm_dev(int argc, char **argv)
 			ret++;
 		} else if (res < 0) {
 			fprintf(stderr,
-				"ERROR: error removing the device '%s' - %s\n",
+				"ERROR: ioctl error removing the device '%s' - %s\n",
 				argv[i], strerror(e));
 			ret++;
 		}
-- 
2.0.0.153.g79dcccc


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-11 11:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-13 12:37 [PATCH 1/1] btrfs-progs: improve troubleshooting avoid duplicate error strings Anand Jain
2015-04-13 13:40 ` Marc MERLIN
2015-04-14 13:14 ` David Sterba
2015-05-08  8:28   ` Anand Jain
2015-05-11 11:23     ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).