From nobody Tue Mar 17 12:03:18 2026 X-Original-To: dev-commits-src-branches@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 4fZrFf6HKkz6W8sw for ; Tue, 17 Mar 2026 12:03:18 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fZrFf4JjTz4PQ5 for ; Tue, 17 Mar 2026 12:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773748998; 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=qSElpWEHxRJtgbFGiGw0N3YpQcKngjKjM7UWKoPS/8A=; b=wf/c+5/ESP+9BHxmPudh3PxkPvWy4qXphWenVKYZLROLotO+H/ZNs12pBMqxGsNmYhIqbg s9vUQHEzs1d2evmEhhPqZi130rMQBQZRZuFC/AxeXKuzGKH6IKqT7SfOzNMnm99wV7ScuO esI8e6waRMe2KiLCYMqNB+Cn2VXIanit9yaaIDttHI4coRYc4QAm+sdDCaTIM+wjrG2GZ+ 9FZPLKgtWy5k65GayQKupJSvDyVSK7QcA7xKkZffmFePb9k1E6rkHIepto5uWyu999oc7P gbU/CUlBvsui/Kd/oU7x9ZxcOKeKbAti/J6Cg0GlyGrG8hRQRERwlaACnVnc+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1773748998; a=rsa-sha256; cv=none; b=GklNaUS7TOJFhQL+VcqSXxBJW8vAgg7xZzW30X8L1dPwXfy2XtAJJq6W5hTv0ymrPqj4CQ 8p0p2F2EHVGuUjGNvpJZ6+8u2O8C1F7YL8xXaj9IKFi4/nYy+5+FHzvb8iII9uEs2dqY+/ ZyLi3vzE33nvlZJQCwjlu6+Wei7vJOwJGQiSv2a/EYu4Bgw0meITWVY1ZA1BR7QiFotlx8 44uqhYg1KNfcDYIX4r3Ehi5C0Dvynwq0m9CtQUgkRHsIVOz9QrrR5xcWKQTBvTYZjHoEbb scyheHUCj0Hfl+qh40xQq2qs3wW4I6ZDj4gp3kq4AL35hTLcud3ywPvfxG/sHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773748998; 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=qSElpWEHxRJtgbFGiGw0N3YpQcKngjKjM7UWKoPS/8A=; b=Lv5wH0jBQMn+XItzYjRNXEoz228/ES3jMtuFKHrjlq9wKZ21eGJwDP6ZxaJ8UcJg+Qgj2O cSrNQM/O+9GiEDnpQYn/7QS6vv/GKIt62BeNXi68oNiOiLInaH4khvl4vWLWZfwiXf3nle pq88u3sWSZZfiYllk28lqwA9Uuf6hDQ/ypnTYFr0LkK6jIt7rQweg4ubGYDyWh0wHOUrsp 6MSf5Wkp5G0zQFjQBUjHfNqHeNHlsLF7EbBq1XmI5ePWMNeynzfG2BoIh2fHkE5msK4sas DhK8RTjhP1TdbpCEtDpNkakuDZxP5yrBf3QM3+H7XEyHxHe5bIMY5praCn5kBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fZrFf3222z5yF for ; Tue, 17 Mar 2026 12:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3208f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 17 Mar 2026 12:03:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: edc9c3ee463e - stable/15 - virtual_oss: Combine -d, -l and -L option getopt code List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: edc9c3ee463e04475602a665e89b17e6a32f5e96 Auto-Submitted: auto-generated Date: Tue, 17 Mar 2026 12:03:18 +0000 Message-Id: <69b94306.3208f.7ee1d0db@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=edc9c3ee463e04475602a665e89b17e6a32f5e96 commit edc9c3ee463e04475602a665e89b17e6a32f5e96 Author: Christos Margiolis AuthorDate: 2026-03-10 10:55:21 +0000 Commit: Christos Margiolis CommitDate: 2026-03-17 12:03:14 +0000 virtual_oss: Combine -d, -l and -L option getopt code Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55671 (cherry picked from commit a2b601343bf9261c4ada51e4d4c30c5b9320bb2b) --- usr.sbin/virtual_oss/virtual_oss/main.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/main.c b/usr.sbin/virtual_oss/virtual_oss/main.c index 28095880c201..7e677b6c5dbe 100644 --- a/usr.sbin/virtual_oss/virtual_oss/main.c +++ b/usr.sbin/virtual_oss/virtual_oss/main.c @@ -2226,24 +2226,6 @@ parse_options(int narg, char **pparg, int is_main) strncpy(profile.wav_name, optarg, sizeof(profile.wav_name)); break; case 'd': - if (strlen(optarg) > VMAX_STRING - 1) - return ("Device name too long"); - strncpy(profile.oss_name, optarg, sizeof(profile.oss_name)); - - if (profile.bits == 0 || voss_dsp_sample_rate == 0 || - profile.channels == 0 || voss_dsp_samples == 0) - return ("Missing -b, -r, -c or -s parameters"); - - val = (voss_dsp_samples * - profile.bits * profile.channels) / 8; - if (val <= 0 || val >= (1024 * 1024)) - return ("-s option value is too big"); - - ptr = dup_profile(&profile, opt_amp, opt_pol, - opt_mute[0], opt_mute[1], 0, 1); - if (ptr != NULL) - return (ptr); - break; case 'L': case 'l': if (strlen(optarg) > VMAX_STRING - 1) @@ -2252,7 +2234,7 @@ parse_options(int narg, char **pparg, int is_main) if (profile.bits == 0 || voss_dsp_sample_rate == 0 || profile.channels == 0 || voss_dsp_samples == 0) - return ("Missing -b, -r, -r or -s parameters"); + return ("Missing -b, -r, -c or -s parameters"); val = (voss_dsp_samples * profile.bits * profile.channels) / 8; @@ -2260,7 +2242,7 @@ parse_options(int narg, char **pparg, int is_main) return ("-s option value is too big"); ptr = dup_profile(&profile, opt_amp, opt_pol, - opt_mute[0], opt_mute[1], c == 'L', 0); + opt_mute[0], opt_mute[1], c == 'L', c == 'd'); if (ptr != NULL) return (ptr); break;