From nobody Mon Mar 07 19:41:51 2022 X-Original-To: dev-commits-src-all@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 95F5919F8055; Mon, 7 Mar 2022 19:41:51 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KC83g3kPNz3Hfm; Mon, 7 Mar 2022 19:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646682111; 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=Y2dees1ytUjgbjnx93AKzKf5/CzSBxHvwnXlAc5nCyg=; b=Pl6ms23QL7QKY9+ZbrH6qXIXWrj7IXlolFR99Wiz7KLPqo72sPM+kpW86SgeQIwDA+8Okf +xcC86ptkQDYeV8JCaiJ5ky3ZouQ4zw973IKz4lRqFfU3SG+v/3sKj62W3m0Y2lu7S4sta DVeugQeHfMq8A3XD4SgcoLBoRP9uiw6Bb8la4vB628nqKGJvUrELwRFMq10JzEG7kma98o z/7DrXtWWU337KPXrLHTDI2S/2IIFVYupe16cF5maK1My+xEBT5zqWEh28l3LSqux5utUo GS3gRLTN9HJZpq2fjPj+OVrUejBFljk1mjmEhfN2UV7i2D+/y1YJhEQ83PiWDg== 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 605F36A0B; Mon, 7 Mar 2022 19:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 227JfpKX094244; Mon, 7 Mar 2022 19:41:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 227Jfpqx094243; Mon, 7 Mar 2022 19:41:51 GMT (envelope-from git) Date: Mon, 7 Mar 2022 19:41:51 GMT Message-Id: <202203071941.227Jfpqx094243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: dd7a5bc1e6d9 - main - GEOM: Make G_F_CTLDUMP also dump result. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd7a5bc1e6d9d5a102ba384531e2ec09ba60e3a1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646682111; 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=Y2dees1ytUjgbjnx93AKzKf5/CzSBxHvwnXlAc5nCyg=; b=S+9OLp2EaKpxdCsa1T3QweqwBdAghY2TFQIPHTDbeTuxOJy4YefG6XhM+vuJSTMVWxqZt8 GjLMNW/7LNVendh3fcV84QWerhKkUBDFBiVvELKVp98Mpxp6jhzfh9H/fG+6vM2r67XdC0 eJ6bk8R+HimFOXG71Rh/NxXpMpoigd/CRMOPMGbOkAh1YdCZaFJrTjj/GbCZOh53n7SvFo vJurRtwjRyXtnGJRkxjBDWbIwH1+2vahElnYcD1d7OQI9ZiBGHjblABdQwoHIWWjBDrI2a DbxyNJEz0fPnGu9aq4ojeLbURqPqgEv/h2pEJ96mzsiIU2/PK/SrbbgkvaXY/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646682111; a=rsa-sha256; cv=none; b=bf/rWuE7zfFpJ1uV6I3Ck/EN56XjE8Jfxs2I5xKqz4THhMtnz0YtUSk3KbNvrcHICSJGSr 3nE2HLU7Q4siE83ODsJPL3sC0NNGSqfc3jvcRSs4aBCEnUreEcXnL2QXVjziTCrjw0BZZf XazijoTQ7ko9K6R+2Fo3a65ehc8Pl1nac/A17PCYqP7YGdVqZ3ug+MdkBmyvWMpXjnDfDe pBKpZ03kjicVZIRS+6CQM7FLIvl973gchzklCPnZ5Wqk+JZMjRvcFXwfhJgFccbDm9mVVg /kFfw2xTNglkkvuSRDKMELnfKu5Db/c0AQYfa9VPVrGjY3+iDGv3VW/7eSyHSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=dd7a5bc1e6d9d5a102ba384531e2ec09ba60e3a1 commit dd7a5bc1e6d9d5a102ba384531e2ec09ba60e3a1 Author: Alexander Motin AuthorDate: 2022-03-07 19:40:28 +0000 Commit: Alexander Motin CommitDate: 2022-03-07 19:41:47 +0000 GEOM: Make G_F_CTLDUMP also dump result. MFC after: 1 month --- sys/geom/geom_ctl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c index ce308d236dc1..307ccd989ca0 100644 --- a/sys/geom/geom_ctl.c +++ b/sys/geom/geom_ctl.c @@ -282,13 +282,13 @@ gctl_free(struct gctl_req *req) } static void -gctl_dump(struct gctl_req *req) +gctl_dump(struct gctl_req *req, const char *what) { struct gctl_req_arg *ap; u_int i; int j; - printf("Dump of gctl request at %p:\n", req); + printf("Dump of gctl %s at %p:\n", what, req); if (req->nerror > 0) { printf(" nerror:\t%d\n", req->nerror); if (sbuf_len(req->serror) > 0) @@ -540,10 +540,14 @@ g_ctl_ioctl_ctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct th gctl_copyin(req); if (g_debugflags & G_F_CTLDUMP) - gctl_dump(req); + gctl_dump(req, "request"); if (!req->nerror) { g_waitfor_event(g_ctl_req, req, M_WAITOK, NULL); + + if (g_debugflags & G_F_CTLDUMP) + gctl_dump(req, "result"); + gctl_copyout(req); } }