diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2013-09-05 20:18:59 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2013-09-05 20:18:59 +0000 |
commit | d1d015864103b253b3fcb2f72a0da5b0cfeb31b6 (patch) | |
tree | 22b131dceb13c3df96da594fbaadb693504797c7 /sbin/hastctl | |
parent | 12d4083451fc39b3e831d4ea0bfa67d3b32cfb54 (diff) | |
parent | b6f49c23a36f329cbf1e7f28078e17fd87f0e245 (diff) | |
download | src-d1d015864103b253b3fcb2f72a0da5b0cfeb31b6.tar.gz src-d1d015864103b253b3fcb2f72a0da5b0cfeb31b6.zip |
Merge from head
Notes
Notes:
svn path=/projects/bmake/; revision=255263
Diffstat (limited to 'sbin/hastctl')
-rw-r--r-- | sbin/hastctl/Makefile | 5 | ||||
-rw-r--r-- | sbin/hastctl/hastctl.c | 16 |
2 files changed, 8 insertions, 13 deletions
diff --git a/sbin/hastctl/Makefile b/sbin/hastctl/Makefile index e7cd9cbea10c..02531e6f5e8f 100644 --- a/sbin/hastctl/Makefile +++ b/sbin/hastctl/Makefile @@ -21,6 +21,7 @@ MAN= hastctl.8 NO_WFORMAT= NO_WCAST_ALIGN= +NO_WMISSING_VARIABLE_DECLARATIONS= CFLAGS+=-I${.CURDIR}/../hastd CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DINET @@ -31,8 +32,8 @@ CFLAGS+=-DINET6 CFLAGS+=-DYY_NO_UNPUT CFLAGS+=-DYY_NO_INPUT -DPADD= ${LIBL} ${LIBUTIL} -LDADD= -ll -lutil +DPADD= ${LIBUTIL} +LDADD= -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto diff --git a/sbin/hastctl/hastctl.c b/sbin/hastctl/hastctl.c index 883a2980e976..11b5b8d87229 100644 --- a/sbin/hastctl/hastctl.c +++ b/sbin/hastctl/hastctl.c @@ -293,6 +293,7 @@ control_set_role(struct nv *nv, const char *newrole) static int control_list(struct nv *nv) { + pid_t pid; unsigned int ii; const char *str; int error, ret; @@ -331,6 +332,9 @@ control_list(struct nv *nv) str = nv_get_string(nv, "status%u", ii); if (str != NULL) printf(" status: %s\n", str); + pid = nv_get_int32(nv, "workerpid%u", ii); + if (pid != 0) + printf(" workerpid: %d\n", pid); printf(" dirty: %ju (%NB)\n", (uintmax_t)nv_get_uint64(nv, "dirty%u", ii), (intmax_t)nv_get_uint64(nv, "dirty%u", ii)); @@ -504,18 +508,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) |