Page MenuHomeFreeBSD

D45603.id.diff
No OneTemporary

D45603.id.diff

diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -2047,6 +2047,7 @@
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 @@
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 @@
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.

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 2, 4:16 AM (8 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13303993
Default Alt Text
D45603.id.diff (1 KB)

Event Timeline