From nobody Wed Aug 19 17:39:50 2026 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 4hQDNb3pDrz6pNdQ; Wed, 19 Aug 2026 17:39:59 +0000 (UTC) (envelope-from j@uriah.heep.sax.de) Received: from uriah.heep.sax.de (uriah.heep.sax.de [213.240.137.9]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4hQDNY6cP7z3KTg; Wed, 19 Aug 2026 17:39:57 +0000 (UTC) (envelope-from j@uriah.heep.sax.de) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of j@uriah.heep.sax.de designates 213.240.137.9 as permitted sender) smtp.mailfrom=j@uriah.heep.sax.de Received: by uriah.heep.sax.de (Postfix, from userid 107) id 5B380CC2C; Wed, 19 Aug 2026 19:39:50 +0200 (CEST) Date: Wed, 19 Aug 2026 19:39:50 +0200 From: Joerg Wunsch To: ShengYi Hung Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 749318f2ae56 - main - libusb: capsicumize libusb Message-ID: References: <6a7f2fa2.41138.6d86e1c7@gitrepo.freebsd.org> 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a7f2fa2.41138.6d86e1c7@gitrepo.freebsd.org> X-GPG-Fingerprint-1: 5E84 F980 C3CA FD4B B584 1070 F48C A81B 69A8 5873 X-GPG-Fingerprint-2: 5662 8323 218C 669F F578 705C 7E9E ADC3 030D 34EB X-Spamd-Result: default: False [-2.49 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.79)[-0.791]; FORGED_SENDER(0.30)[joerg@freebsd.org,j@uriah.heep.sax.de]; ONCE_RECEIVED(0.20)[]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:8820, ipnet:213.240.128.0/18, country:DE]; FREEFALL_USER(0.00)[j]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[joerg@freebsd.org,j@uriah.heep.sax.de]; MISSING_XM_UA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4hQDNY6cP7z3KTg X-Spamd-Bar: -- Too bad this changes the API of libusb 2.0 in an incompatible way. I have an (external) application that uses libusb 2.0 when it is being compiled on FreeBSD (AVaRICE) which now breaks. Nobody ever declared that the libusb 2.0 API were a FreeBSD-internal one only not to be used by outside code. Could I convince people to at least add a version ID macro to the public header file that can be used to test the API level? Like #define LIBUSB20_VERSION 202608 That would allow constructs like #if defined(LIBUSB20_VERSION) && (LIBUSB20_VERSION >= 202608) // use libusb20_be_ctx here #endif (Sorry, I missed the review server item before.) As ShengYi Hung wrote: > @@ -294,11 +295,13 @@ int libusb20_be_set_template(struct libusb20_backend *pbe, int temp); > > /* USB backend operations */ > > -struct libusb20_backend *libusb20_be_alloc(const struct libusb20_backend_methods *methods); > -struct libusb20_backend *libusb20_be_alloc_default(void); > -struct libusb20_backend *libusb20_be_alloc_freebsd(void); > -struct libusb20_backend *libusb20_be_alloc_linux(void); > -struct libusb20_backend *libusb20_be_alloc_ugen20(void); > +struct libusb20_backend *libusb20_be_alloc(const struct libusb20_backend_methods *methods, struct libusb20_be_ctx *pctx); > +struct libusb20_backend *libusb20_be_alloc_default(struct libusb20_be_ctx *pctx); > +struct libusb20_backend *libusb20_be_alloc_freebsd(struct libusb20_be_ctx *pctx); > +struct libusb20_backend *libusb20_be_alloc_linux(struct libusb20_be_ctx *pctx); > +struct libusb20_backend *libusb20_be_alloc_ugen20(struct libusb20_be_ctx *pctx); > +struct libusb20_be_ctx *libusb20_be_ctx_alloc(void); > +void libusb20_be_ctx_free(struct libusb20_be_ctx *pctx); > struct libusb20_device *libusb20_be_device_foreach(struct libusb20_backend *pbe, struct libusb20_device *pdev); > void libusb20_be_dequeue_device(struct libusb20_backend *pbe, struct libusb20_device *pdev); > void libusb20_be_enqueue_device(struct libusb20_backend *pbe, struct libusb20_device *pdev); -- cheers, Joerg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)