From nobody Wed Jun 19 10:01:51 2024 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 4W3zg41qVPz5PKG5; Wed, 19 Jun 2024 10:01:52 +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 4W3zg35TNZz4JqV; Wed, 19 Jun 2024 10:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718791311; 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=6s9PeV+ipdqEQImCDlvMOHjDqlFgxnHdVyZUzj+abWU=; b=SsO7qNarl3nNPhOR+gcPowYSyrzgc2CQoeMKP23UYEce8XKPGo+81L9Vhc5Up/PufN2Sa+ y3ZYhD9GAvXIlXs6tHYrwdR4GYgzVRjQnMASwDaWhckT2YMxO078F+N50RVFsd0FXL7n/j cLnbAzteW/tAsZkp6piTx8kiWBxOeE/rHTalSKTJraBuoU0Fjarc/tyWSUt2M+BN8lQvzg BAD8qXpJS8x7xeQBz6jOy2Fs7ElhVAmwvw4XUSCp+Je49pG6OobbUIv+BBsZzE9Witindq Zb7KrN8uUTcdwWRIgStK4ENNS9ypkI8vID6n4c7KoUsMx3RTc7Fa0L4RoEuDjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718791311; a=rsa-sha256; cv=none; b=Q3qzn0ijG1jqMCNtba20R+QLqwOSgmGKqVhxmGoD/hwG+NWbiEjOGfXnH4uU9hjjcDyxIh ucU4KUggi4r9WQji5JqARAoWhGwr3ss+JM//dvcWI2DZjiz+aiHFfSUOPsi/UyEB3srggE eBr5pkG0Ej38JPGqv9fYQPOgUbju228/fO53nkxI4KcKF7csJLnSl0khc+JYVE6O3jtBJi g5OfxVkim/yUrZ3M5tDx8WMWIMMiUxYlCdXXrWYB71nmHylBxBW181V10mB0gMZf8hotBj 7zgt3rRwL95vcT/Ie4TphyA81lJkDmHoMVlg7XDD3sxHuF6U2qgKe0oK6djS0g== 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=1718791311; 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=6s9PeV+ipdqEQImCDlvMOHjDqlFgxnHdVyZUzj+abWU=; b=CsHrEQ5KAS6CJ5SiFggwbofpUSZ2JY6PJBqza0aB2Lk6rGQQZS1BIxmNkSeWYDZoEkr1n2 lck0f7bySrKcu26fWD4T74mtfD0vdNFjHitxFQDaK3S3VWj3N/nfvGDHZVlVNaMjg0YbVP JARwbE4gcRQ1DmFn5iz8WdhqU+N4v0UxDjdoqj+/zDuvo0SRZxxN/9Fm25dQoxvxUmDcaO uRUILGdl2ZwWPRV8p+ADwQksxYlf3EBVEkAkNgB5v2jOs05J2Tnq+D1Lu4xGKpsXMWFISx UooYK3wCzh79eg1kDUrgxaIfgNl436FZHw7NMqi1fl2ht19sgSQTCmg2I6YYqw== 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 4W3zg354m0zdSB; Wed, 19 Jun 2024 10:01:51 +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 45JA1pjA031517; Wed, 19 Jun 2024 10:01:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45JA1pfE031514; Wed, 19 Jun 2024 10:01:51 GMT (envelope-from git) Date: Wed, 19 Jun 2024 10:01:51 GMT Message-Id: <202406191001.45JA1pfE031514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f1ee9f5425bd - stable/14 - sound: Support oss_audioinfo->cmd 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 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/14 X-Git-Reftype: branch X-Git-Commit: f1ee9f5425bd1d5798ad7e88c5b803308bd518c5 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f1ee9f5425bd1d5798ad7e88c5b803308bd518c5 commit f1ee9f5425bd1d5798ad7e88c5b803308bd518c5 Author: Christos Margiolis AuthorDate: 2024-06-18 13:18:58 +0000 Commit: Christos Margiolis CommitDate: 2024-06-19 10:01:33 +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 (cherry picked from commit 8e36d212594b542cb0c57d549e0b57fd0f7e307c) --- 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.