From nobody Sat Oct 12 18:30:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XQsVn34hwz5YncN; Sat, 12 Oct 2024 18:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XQsVn28SKz4F34; Sat, 12 Oct 2024 18:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728757825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FDSDE0YHYQJyjpCHzajFKdzlw5ObIwDlLvGR91cU5E=; b=kCz8qDjOuc5vsAqZ7nhIS/C1f64Yzc0cpmxRKsausMlvdBbJlswf+vGtXZIs2px60b8pTb 0AaL5bK3BoZh3R7rO5WhMIMoNi+S0ScE8peoF7ovES/gUHZMwo+X6JgrXZPmBeva7GM6wp 2osoBiOTcWEHxQ7Buq2oqY0gaOKXr3dpxMvAuiJMGGfFStAt19tkmsrKAqA08p5Tx2gSGg Dmdsz1mmI1M9BOxtYJkiAXIAhugVXJEPTNlfqHaDNTEt8jYEfTZZ1s2nV7WtHOm+26RRqs iPFjfBE467JfpquaA6+XU+rzNiUHhLewOURLXN+5ruJm9Y0aQDb0YsCPLEnQJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728757825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FDSDE0YHYQJyjpCHzajFKdzlw5ObIwDlLvGR91cU5E=; b=n4+0CIJGEr2IJ5/NIccG/jgUM1Z1uUhGTbUI+IURXj5Txz1pOIV5koD41bCuM82wcKWKUh TDmBm912pM34lwdRTz6NAxSRN1FTLlAhJf2FqGnrdWEVCfaA3IZZJZdN3eC7ie5RUaf1ep t7LYBoqs7Il+nLa46/y5dUfkEUTjzsnhj3NCc/yKfoKMdNE/CRhOqxtKpKZQfYIMvi6Zow XsdFnSaX76RXhzc7WBfmSLkiz2AHlW3GQ4lCQ8g9KOmQcNQcolyezjArbO4RZNteHfG5fX 0iJ4XYKstA4NIH6P/sZpblmMc6RZpRyzhIgFg7ZsSyFox7D6Acyrix0G6iRodw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728757825; a=rsa-sha256; cv=none; b=pM0WlPFBpuQOSaOkGKZourm4zR7wNFMwiwPTuSePfKgLr0gYAnbBp8TjpB1rHY5O+IvzRb LKnUfMhxuGzLM4ByozpGWGGI/Rn1IvdsayDt8SL4jGobZ9cCsIehaRtmBTaAJu8fH+GnY7 YDJi2I+KgkItY4d0lJ9wC1b03oexyMqk9Gvg6l+9xyMRX+kGxqcHetuRtsEPridO+Hzm0G z9zv36IifBoHNQZLFfbXjyxSdrdMPSgUw3ojN/qkOe3JGp63GVMXtqviB7E1nFRRaiwpVT gq7E8ySEQpCaQJ2I2innj7359hhWqsjZ5DBe3+TWEgynnkPMzPJcKXbhhz4MVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XQsVn1mgMzKXy; Sat, 12 Oct 2024 18:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49CIUPte092467; Sat, 12 Oct 2024 18:30:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49CIUPl5092464; Sat, 12 Oct 2024 18:30:25 GMT (envelope-from git) Date: Sat, 12 Oct 2024 18:30:25 GMT Message-Id: <202410121830.49CIUPl5092464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 00f003da7d07 - main - iscsictl(8): Complete libxo transition List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00f003da7d0702caf10d3306b0290efe6b812d32 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=00f003da7d0702caf10d3306b0290efe6b812d32 commit 00f003da7d0702caf10d3306b0290efe6b812d32 Author: Yan-Hao Wang AuthorDate: 2024-10-12 15:26:55 +0000 Commit: Li-Wen Hsu CommitDate: 2024-10-12 18:21:48 +0000 iscsictl(8): Complete libxo transition Reviewed by: des MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41423 --- usr.bin/iscsictl/iscsictl.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/usr.bin/iscsictl/iscsictl.c b/usr.bin/iscsictl/iscsictl.c index b75ff889a9a6..922e9ed9ebea 100644 --- a/usr.bin/iscsictl/iscsictl.c +++ b/usr.bin/iscsictl/iscsictl.c @@ -709,20 +709,20 @@ static void usage(void) { - fprintf(stderr, "usage: iscsictl -A -p portal -t target " + xo_error("usage: iscsictl -A -p portal -t target " "[-u user -s secret] [-w timeout] [-e on | off]\n"); - fprintf(stderr, " iscsictl -A -d discovery-host " + xo_error(" iscsictl -A -d discovery-host " "[-u user -s secret] [-e on | off]\n"); - fprintf(stderr, " iscsictl -A -a [-c path]\n"); - fprintf(stderr, " iscsictl -A -n nickname [-c path]\n"); - fprintf(stderr, " iscsictl -M -i session-id [-p portal] " + xo_error(" iscsictl -A -a [-c path]\n"); + xo_error(" iscsictl -A -n nickname [-c path]\n"); + xo_error(" iscsictl -M -i session-id [-p portal] " "[-t target] [-u user] [-s secret] [-e on | off]\n"); - fprintf(stderr, " iscsictl -M -i session-id -n nickname " + xo_error(" iscsictl -M -i session-id -n nickname " "[-c path]\n"); - fprintf(stderr, " iscsictl -R [-p portal] [-t target]\n"); - fprintf(stderr, " iscsictl -R -a\n"); - fprintf(stderr, " iscsictl -R -n nickname [-c path]\n"); - fprintf(stderr, " iscsictl -L [-v] [-w timeout]\n"); + xo_error(" iscsictl -R [-p portal] [-t target]\n"); + xo_error(" iscsictl -R -a\n"); + xo_error(" iscsictl -R -n nickname [-c path]\n"); + xo_error(" iscsictl -L [-v] [-w timeout]\n"); exit(1); } @@ -743,8 +743,8 @@ main(int argc, char **argv) struct target *targ; argc = xo_parse_args(argc, argv); - if (argc < 0) - exit(1); + if (argc < 0) + exit(1); xo_set_version(ISCSICTL_XO_VERSION); xo_open_container("iscsictl"); @@ -1052,10 +1052,11 @@ main(int argc, char **argv) xo_err(1, "close"); xo_close_container("iscsictl"); - xo_finish(); + if (xo_finish() < 0) + xo_err(1, "stdout"); if (failed != 0) - return (1); + exit(1); - return (0); + exit(0); }