From nobody Tue Jun 18 13:19:30 2024 X-Original-To: dev-commits-src-main@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 4W3S5Z6tFVz5NnZR; Tue, 18 Jun 2024 13:19:30 +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 4W3S5Z681mz4KHM; Tue, 18 Jun 2024 13:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718716770; 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=BuxUvVVekTFSIio+DwXh6k5ihEO2hDyqsvsrV+LJGPo=; b=mxgd9iKJOlGfotFwFDw29POlU/K7Q5h01IsiyCU9UEaBjVyy3Y5y3clkwjnYb/Wpc71eF6 iR9a7YN8vDlXz22FuSyxFwDqJic1SYYmqRsCpE61zrzeUafpaPXVrur3QYmN2pXtLb7n9e Ab5DEY0Irb21c2t3KxfNGwfAxSVC3P6kHjhcTu0ysqoc1Km+f7uqM/yKOIeVUw8pESqtfq 0zZlvgCIFIDtiTULhUWaS8vwdmciMsOYUfv3GRr9aeu+cVcvbuHgJJmiTqSJHc961eKnWg X6PLrYZzX3n9+4nbSGqgGuelO6K3ypiTDXhcJ1nIxTyd4a82qEt6VieZKs9RSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718716770; a=rsa-sha256; cv=none; b=aZUGPzrMQYLXDz2T/xr2TFzFBJd7zg6OwaoXTK+QMiBn0H/iZKU0Zu3JMy0upcqFIhnQnN NDKAfhO6Uo5h3apNYeTmlY2lxsF8Ykn08Wx3NiXKXEe2M+Shi5w4DZXSjYdtI/umDJVmuf OID98CE0wO3GjHIoSu4SAfK6UC6M3rIIAOUEeFJiK2qNe7ZfE8MLLXrhzMmY8qBai+nbL3 6f83g+SlBWET1xpcABOiQaCSh9bg1E4iue2tZJJGQWWrKG1Dg9FG1AdVlhPo1KfJKRUTGV KD1Q6qWYdFIpaAFXMMR1mNsoFzVVowTjN2rIzjC+aooHaFbiINtqpVvAFtJyvA== 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=1718716770; 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=BuxUvVVekTFSIio+DwXh6k5ihEO2hDyqsvsrV+LJGPo=; b=Q0ExCkuhJrEv0IZi+lydlfauElz1/HbT6VbrIbvAdfbUMRpAKx17q9khxNuknoPLhlNSNg Nmxy0pHB1mbJdHCCb5XT3yug1lSP3rwcLu4gdb8tXeKPJoasBqBkw+s8XHO/SaeOPre6Fu oXdW7GlduKX2jZonWR7TYG6hBnplxdJw1hY4yFMCAnvh3jBDDrF2id70AEOGN0h26HWwN+ c2emr6z5vXUCIDwiqx7gef0QRphb9OWliJ+LFfOiDES7epELBwBKpq5EKVw4Bp8GlvPBoF 65fWHHmSuVG/Y06+ew/GX/IRbmWpWTod8RMWY83w5FDCZazR1FqWnMdaRe9JKg== 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 4W3S5Z5gvXz10d5; Tue, 18 Jun 2024 13:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45IDJUHJ016007; Tue, 18 Jun 2024 13:19:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45IDJUVT016004; Tue, 18 Jun 2024 13:19:30 GMT (envelope-from git) Date: Tue, 18 Jun 2024 13:19:30 GMT Message-Id: <202406181319.45IDJUVT016004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 8e36d212594b - main - sound: Support oss_audioinfo->cmd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 8e36d212594b542cb0c57d549e0b57fd0f7e307c Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8e36d212594b542cb0c57d549e0b57fd0f7e307c commit 8e36d212594b542cb0c57d549e0b57fd0f7e307c Author: Christos Margiolis AuthorDate: 2024-06-18 13:18:58 +0000 Commit: Christos Margiolis CommitDate: 2024-06-18 13:18:58 +0000 sound: Support oss_audioinfo->cmd Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45603 --- sys/dev/sound/pcm/dsp.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index c737df33b97d..0f6d7e6b7f49 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2047,6 +2047,7 @@ dsp_oss_audioinfo_unavail(oss_audioinfo *ai, int unit) ai->dev = unit; snprintf(ai->name, sizeof(ai->name), "pcm%d (unavailable)", unit); ai->pid = -1; + strlcpy(ai->cmd, CHN_COMM_UNUSED, sizeof(ai->cmd)); ai->card_number = unit; ai->port_number = unit; ai->mixer_dev = -1; @@ -2132,6 +2133,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) ai->dev = unit; strlcpy(ai->name, device_get_desc(d->dev), sizeof(ai->name)); ai->pid = -1; + strlcpy(ai->cmd, CHN_COMM_UNKNOWN, sizeof(ai->cmd)); ai->card_number = -1; ai->port_number = -1; ai->mixer_dev = (d->mixer_dev != NULL) ? unit : -1; @@ -2317,14 +2319,8 @@ dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai) else ai->busy = (ch->direction == PCMDIR_PLAY) ? OPEN_WRITE : OPEN_READ; - /** - * @note - * @c cmd - OSSv4 docs: "Only supported under Linux at - * this moment." Cop-out, I know, but I'll save - * running around in the process table for later. - * Is there a risk of leaking information? - */ ai->pid = ch->pid; + strlcpy(ai->cmd, ch->comm, sizeof(ai->cmd)); /* * These flags stolen from SNDCTL_DSP_GETCAPS handler.