Date: Sun, 21 Apr 2013 20:51:54 +0000 (UTC) From: Mikolaj Golub <trociny@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249741 - head/sbin/hastctl Message-ID: <201304212051.r3LKpshn045272@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trociny Date: Sun Apr 21 20:51:53 2013 New Revision: 249741 URL: http://svnweb.freebsd.org/changeset/base/249741 Log: Remove code duplication. Modified: head/sbin/hastctl/hastctl.c Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Sun Apr 21 19:55:38 2013 (r249740) +++ head/sbin/hastctl/hastctl.c Sun Apr 21 20:51:53 2013 (r249741) @@ -504,18 +504,8 @@ main(int argc, char *argv[]) nv_add_string(nv, argv[ii + 1], "resource%d", ii); break; case CMD_LIST: - /* Obtain verbose status of the given resources. */ - nv = nv_alloc(); - nv_add_uint8(nv, HASTCTL_CMD_STATUS, "cmd"); - if (argc == 0) - nv_add_string(nv, "all", "resource%d", 0); - else { - for (ii = 0; ii < argc; ii++) - nv_add_string(nv, argv[ii], "resource%d", ii); - } - break; case CMD_STATUS: - /* Obtain brief status of the given resources. */ + /* Obtain status of the given resources. */ nv = nv_alloc(); nv_add_uint8(nv, HASTCTL_CMD_STATUS, "cmd"); if (argc == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304212051.r3LKpshn045272>