Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Apr 2022 02:45:19 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: aacc15792681 - stable/13 - GEOM: Make G_F_CTLDUMP also dump result.
Message-ID:  <202204060245.2362jJAQ006494@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=aacc1579268125a41f71c085bbabe9e5095cc009

commit aacc1579268125a41f71c085bbabe9e5095cc009
Author:     Alexander Motin <mav@FreeBSD.org>
AuthorDate: 2022-03-07 19:40:28 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2022-04-06 02:07:40 +0000

    GEOM: Make G_F_CTLDUMP also dump result.
    
    MFC after:      1 month
    
    (cherry picked from commit dd7a5bc1e6d9d5a102ba384531e2ec09ba60e3a1)
---
 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 5690b857a639..ba22a2c5216a 100644
--- a/sys/geom/geom_ctl.c
+++ b/sys/geom/geom_ctl.c
@@ -229,13 +229,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)
@@ -487,10 +487,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);
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204060245.2362jJAQ006494>