Author: marck (doc committer)
Date: Mon May 27 13:51:57 2013
New Revision: 251026
URL: http://svnweb.freebsd.org/changeset/base/251026

Log:
  Preparation for MFC revs r248291 and r249741:
  
  Add 'list' command, for now the exact equivalent of 'status',
  so users of the latter could change their scripts.
  
  This is direct commit to stable, and is temporary.
  
  Requested by: Pete French <petefre...@ingresso.co.uk>
  Approved by:  trociny
  2B cleaned after:     6 weeks

Modified:
  stable/8/UPDATING
  stable/8/sbin/hastctl/hastctl.8
  stable/8/sbin/hastctl/hastctl.c

Modified: stable/8/UPDATING
==============================================================================
--- stable/8/UPDATING   Mon May 27 13:49:55 2013        (r251025)
+++ stable/8/UPDATING   Mon May 27 13:51:57 2013        (r251026)
@@ -15,6 +15,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
        debugging tools present in HEAD were left in place because
        sun4v support still needs work to become production ready.
 
+20130524:
+       `list' command has been added to hastctl(8).  For now, it is full
+       equivalent of `status' command.
+       WARNING: in the near future the output of hastctl's status command
+       will change to more terse format.  If you use `hastctl status'
+       for parsing in your scripts, switch to `hastctl list'.
+
 20130429:
        Fix a bug that allows NFS clients to issue READDIR on files.
 

Modified: stable/8/sbin/hastctl/hastctl.8
==============================================================================
--- stable/8/sbin/hastctl/hastctl.8     Mon May 27 13:49:55 2013        
(r251025)
+++ stable/8/sbin/hastctl/hastctl.8     Mon May 27 13:51:57 2013        
(r251026)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 10, 2011
+.Dd May 24, 2013
 .Dt HASTCTL 8
 .Os
 .Sh NAME
@@ -49,6 +49,11 @@
 .Aq init | primary | secondary
 .Ar all | name ...
 .Nm
+.Cm list
+.Op Fl d
+.Op Fl c Ar config
+.Op Ar all | name ...
+.Nm
 .Cm status
 .Op Fl d
 .Op Fl c Ar config
@@ -139,8 +144,19 @@ GEOM provider
 .Pa /dev/hast/<name>
 will not be created on secondary node.
 .El
+.It Cm list
 .It Cm status
-Present status of the configured resources.
+Present verbose status of the configured resources.
+For now, list and status commands are equivalent.
+In the near future the output of 
+.Nm
+status command will change to more terse format.
+If you use `
+.Nm
+status' for parsing in your scripts, switch to `
+.Nm
+list'.
+
 .It Cm dump
 Dump metadata stored on local component for the configured resources.
 .El

Modified: stable/8/sbin/hastctl/hastctl.c
==============================================================================
--- stable/8/sbin/hastctl/hastctl.c     Mon May 27 13:49:55 2013        
(r251025)
+++ stable/8/sbin/hastctl/hastctl.c     Mon May 27 13:51:57 2013        
(r251026)
@@ -70,7 +70,8 @@ enum {
        CMD_CREATE,
        CMD_ROLE,
        CMD_STATUS,
-       CMD_DUMP
+       CMD_DUMP,
+       CMD_LIST
 };
 
 static __dead2 void
@@ -85,6 +86,9 @@ usage(void)
            "       %s role [-d] [-c config] <init | primary | secondary> all | 
name ...\n",
            getprogname());
        fprintf(stderr,
+           "       %s list [-d] [-c config] [all | name ...]\n",
+           getprogname());
+       fprintf(stderr,
            "       %s status [-d] [-c config] [all | name ...]\n",
            getprogname());
        fprintf(stderr,
@@ -381,6 +385,9 @@ main(int argc, char *argv[])
        } else if (strcmp(argv[1], "role") == 0) {
                cmd = CMD_ROLE;
                optstr = "c:dh";
+       } else if (strcmp(argv[1], "list") == 0) {
+               cmd = CMD_LIST;
+               optstr = "c:dh";
        } else if (strcmp(argv[1], "status") == 0) {
                cmd = CMD_STATUS;
                optstr = "c:dh";
@@ -469,6 +476,7 @@ main(int argc, char *argv[])
                for (ii = 0; ii < argc - 1; ii++)
                        nv_add_string(nv, argv[ii + 1], "resource%d", ii);
                break;
+       case CMD_LIST:
        case CMD_STATUS:
                /* Obtain status of the given resources. */
                nv = nv_alloc();
@@ -524,6 +532,7 @@ main(int argc, char *argv[])
        case CMD_ROLE:
                error = control_set_role(nv, argv[0]);
                break;
+       case CMD_LIST:
        case CMD_STATUS:
                error = control_status(nv);
                break;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to