Date: Thu, 18 Jan 2024 22:43:39 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 0469f7ab3c7e - stable/14 - ctl: Always return errno values from ctl_port_register Message-ID: <202401182243.40IMhdN7024850@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0469f7ab3c7e460d581ba37569598e4c90395a6c commit 0469f7ab3c7e460d581ba37569598e4c90395a6c Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-12-27 18:09:24 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-01-18 22:40:31 +0000 ctl: Always return errno values from ctl_port_register Return EBUSY instead of a bare 1 if a port number is already active. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42929 (cherry picked from commit e03e77ba4d0570511fdc1be192459e1160c650a6) --- sys/cam/ctl/ctl_frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/ctl/ctl_frontend.c b/sys/cam/ctl/ctl_frontend.c index ed5e2b3ac8c9..dd4607abb76b 100644 --- a/sys/cam/ctl/ctl_frontend.c +++ b/sys/cam/ctl/ctl_frontend.c @@ -163,7 +163,7 @@ ctl_port_register(struct ctl_port *port) if ((port_num < 0) || (ctl_set_mask(softc->ctl_port_mask, port_num) < 0)) { mtx_unlock(&softc->ctl_lock); - return (1); + return (EBUSY); } softc->num_ports++; mtx_unlock(&softc->ctl_lock);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401182243.40IMhdN7024850>