linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: from troubleshooting point of view messages must be unique
@ 2013-03-01 10:10 Anand Jain
  2013-03-01 10:10 ` [PATCH] btrfs-progs: usage should match what is coded Anand Jain
  0 siblings, 1 reply; 5+ messages in thread
From: Anand Jain @ 2013-03-01 10:10 UTC (permalink / raw)
  To: linux-btrfs

>From the below, we won't readily know from where the error is generated
-----
cmds-device.c:                  fprintf(stderr, "ERROR: unable to scan the device '%s' - %s\n",
utils.c:                fprintf(stderr, "ERROR: unable to scan the device '%s' - %s\n",
-----

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

diff --git a/utils.c b/utils.c
index 1813dda..71da787 100644
--- a/utils.c
+++ b/utils.c
@@ -945,7 +945,7 @@ void btrfs_register_one_device(char *fname)
 	ret = ioctl(fd, BTRFS_IOC_SCAN_DEV, &args);
 	e = errno;
 	if(ret<0){
-		fprintf(stderr, "ERROR: unable to scan the device '%s' - %s\n",
+		fprintf(stderr, "ERROR: device scan failed '%s' - %s\n",
 			fname, strerror(e));
 	}
 	close(fd);
-- 
1.8.1.227.g44fe835


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

* [PATCH] btrfs-progs: usage should match what is coded
  2013-03-01 10:10 [PATCH] btrfs-progs: from troubleshooting point of view messages must be unique Anand Jain
@ 2013-03-01 10:10 ` Anand Jain
  2013-03-01 17:47   ` Eric Sandeen
  0 siblings, 1 reply; 5+ messages in thread
From: Anand Jain @ 2013-03-01 10:10 UTC (permalink / raw)
  To: linux-btrfs

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-restore.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/cmds-restore.c b/cmds-restore.c
index 9385042..4a14f93 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -763,10 +763,6 @@ const char * const cmd_restore_usage[] = {
 	"-f <offset>     filesystem location",
 	"-u <block>      super mirror",
 	"-d              find dir",
-	"-r <num>        root objectid",
-	"-c              ignore case in regular expression",
-	"-m <regexp>     regular expression to match",
-	"-l              list roots",
 	NULL
 };
 
-- 
1.8.1.227.g44fe835


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

* Re: [PATCH] btrfs-progs: usage should match what is coded
  2013-03-01 10:10 ` [PATCH] btrfs-progs: usage should match what is coded Anand Jain
@ 2013-03-01 17:47   ` Eric Sandeen
  2013-03-01 18:05     ` Hugo Mills
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2013-03-01 17:47 UTC (permalink / raw)
  To: Anand Jain; +Cc: linux-btrfs

On 3/1/13 4:10 AM, Anand Jain wrote:
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Revieed-by: Eric Sandeen <sandeen@redhat.com>

But the curious side of me wonders how it got this way.

commit e43cc461550130494194201037590a2b1f0f6880
Author: Ian Kumlien <pomac@demius.net>
Date:   Fri Feb 8 01:37:02 2013 +0100

    Btrfs-progs: add restore command to btrfs

added the usage text below, but didn't change the getopt
or add code to handle them.

No idea where it came from, it wasn't in the standalone
restore either.  *shrug*  I guess nothing got lost.

-Eric

> ---
>  cmds-restore.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/cmds-restore.c b/cmds-restore.c
> index 9385042..4a14f93 100644
> --- a/cmds-restore.c
> +++ b/cmds-restore.c
> @@ -763,10 +763,6 @@ const char * const cmd_restore_usage[] = {
>  	"-f <offset>     filesystem location",
>  	"-u <block>      super mirror",
>  	"-d              find dir",
> -	"-r <num>        root objectid",
> -	"-c              ignore case in regular expression",
> -	"-m <regexp>     regular expression to match",
> -	"-l              list roots",
>  	NULL
>  };
>  
> 


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

* Re: [PATCH] btrfs-progs: usage should match what is coded
  2013-03-01 17:47   ` Eric Sandeen
@ 2013-03-01 18:05     ` Hugo Mills
  2013-03-03 16:33       ` David Sterba
  0 siblings, 1 reply; 5+ messages in thread
From: Hugo Mills @ 2013-03-01 18:05 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Anand Jain, linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]

On Fri, Mar 01, 2013 at 11:47:50AM -0600, Eric Sandeen wrote:
> On 3/1/13 4:10 AM, Anand Jain wrote:
> > Signed-off-by: Anand Jain <anand.jain@oracle.com>
> 
> Revieed-by: Eric Sandeen <sandeen@redhat.com>
> 
> But the curious side of me wonders how it got this way.
> 
> commit e43cc461550130494194201037590a2b1f0f6880
> Author: Ian Kumlien <pomac@demius.net>
> Date:   Fri Feb 8 01:37:02 2013 +0100
> 
>     Btrfs-progs: add restore command to btrfs
> 
> added the usage text below, but didn't change the getopt
> or add code to handle them.
> 
> No idea where it came from, it wasn't in the standalone
> restore either.  *shrug*  I guess nothing got lost.

   -m was definitely a thing at some point, as I recall using it. I
think the code was in josef's progs tree. I suspect the other options
were part of that, too. (And -m was definitely really useful for me).

   Hugo.

> -Eric
> 
> > ---
> >  cmds-restore.c | 4 ----
> >  1 file changed, 4 deletions(-)
> > 
> > diff --git a/cmds-restore.c b/cmds-restore.c
> > index 9385042..4a14f93 100644
> > --- a/cmds-restore.c
> > +++ b/cmds-restore.c
> > @@ -763,10 +763,6 @@ const char * const cmd_restore_usage[] = {
> >  	"-f <offset>     filesystem location",
> >  	"-u <block>      super mirror",
> >  	"-d              find dir",
> > -	"-r <num>        root objectid",
> > -	"-c              ignore case in regular expression",
> > -	"-m <regexp>     regular expression to match",
> > -	"-l              list roots",
> >  	NULL
> >  };
> >  
> > 
> 

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
              --- Welcome to Rivendell,  Mr Anderson... ---              

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: [PATCH] btrfs-progs: usage should match what is coded
  2013-03-01 18:05     ` Hugo Mills
@ 2013-03-03 16:33       ` David Sterba
  0 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2013-03-03 16:33 UTC (permalink / raw)
  To: Hugo Mills, Eric Sandeen, Anand Jain, linux-btrfs

On Fri, Mar 01, 2013 at 06:05:21PM +0000, Hugo Mills wrote:
> On Fri, Mar 01, 2013 at 11:47:50AM -0600, Eric Sandeen wrote:
> > On 3/1/13 4:10 AM, Anand Jain wrote:
> > > Signed-off-by: Anand Jain <anand.jain@oracle.com>
> > 
> > Revieed-by: Eric Sandeen <sandeen@redhat.com>
> > 
> > But the curious side of me wonders how it got this way.
> > 
> > commit e43cc461550130494194201037590a2b1f0f6880
> > Author: Ian Kumlien <pomac@demius.net>
> > Date:   Fri Feb 8 01:37:02 2013 +0100
> > 
> >     Btrfs-progs: add restore command to btrfs
> > 
> > added the usage text below, but didn't change the getopt
> > or add code to handle them.
> > 
> > No idea where it came from, it wasn't in the standalone
> > restore either.  *shrug*  I guess nothing got lost.
> 
>    -m was definitely a thing at some point, as I recall using it. I
> think the code was in josef's progs tree. I suspect the other options
> were part of that, too. (And -m was definitely really useful for me).

My fault here, I cherry-picked Ian's commit from a branch with Josef's
updates to restore (adding all the commandline options). I'll pick
Anand's fix to keep help and functionality matching. The updates to
restore are wanted, but as they are based on an old progs version it's
not all trivial to merge them.

david

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

end of thread, other threads:[~2013-03-03 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 10:10 [PATCH] btrfs-progs: from troubleshooting point of view messages must be unique Anand Jain
2013-03-01 10:10 ` [PATCH] btrfs-progs: usage should match what is coded Anand Jain
2013-03-01 17:47   ` Eric Sandeen
2013-03-01 18:05     ` Hugo Mills
2013-03-03 16:33       ` 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).