summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2002-11-30 09:47:20 +0000
committerJaroslav Kysela <perex@perex.cz>2002-11-30 09:47:20 +0000
commit098932ce57a9536e313acbfab877f86b668a9bc6 (patch)
tree25e56414e96aa4192f88fd8cc86e4754e77fb2bc
parentd0526d603c5a3c3db57683f3e2cdd8a6d13c29a9 (diff)
downloadalsa-lib-098932ce57a9536e313acbfab877f86b668a9bc6.tar.gz
Added POLLNVAL to poll->events
-rw-r--r--src/control/control.c2
-rw-r--r--src/hwdep/hwdep.c6
-rw-r--r--src/mixer/mixer.c2
-rw-r--r--src/pcm/pcm.c2
-rw-r--r--src/rawmidi/rawmidi.c2
-rw-r--r--src/seq/seq.c4
-rw-r--r--src/timer/timer.c6
7 files changed, 12 insertions, 12 deletions
diff --git a/src/control/control.c b/src/control/control.c
index 5f0f1bc3..29c81434 100644
--- a/src/control/control.c
+++ b/src/control/control.c
@@ -178,7 +178,7 @@ int snd_ctl_poll_descriptors(snd_ctl_t *ctl, struct pollfd *pfds, unsigned int s
assert(ctl && pfds);
if (space > 0) {
pfds->fd = ctl->poll_fd;
- pfds->events = POLLIN|POLLERR;
+ pfds->events = POLLIN|POLLERR|POLLNVAL;
return 1;
}
return 0;
diff --git a/src/hwdep/hwdep.c b/src/hwdep/hwdep.c
index 994e74b7..c8285926 100644
--- a/src/hwdep/hwdep.c
+++ b/src/hwdep/hwdep.c
@@ -265,13 +265,13 @@ int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned
pfds->fd = hwdep->poll_fd;
switch (hwdep->mode & O_ACCMODE) {
case O_WRONLY:
- pfds->events = POLLOUT|POLLERR;
+ pfds->events = POLLOUT|POLLERR|POLLNVAL;
break;
case O_RDONLY:
- pfds->events = POLLIN|POLLERR;
+ pfds->events = POLLIN|POLLERR|POLLNVAL;
break;
case O_RDWR:
- pfds->events = POLLOUT|POLLIN|POLLERR;
+ pfds->events = POLLOUT|POLLIN|POLLERR|POLLNVAL;
break;
default:
return -EIO;
diff --git a/src/mixer/mixer.c b/src/mixer/mixer.c
index 469d137d..8723a38e 100644
--- a/src/mixer/mixer.c
+++ b/src/mixer/mixer.c
@@ -616,7 +616,7 @@ int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds,
return -EINVAL;
res = 0;
for (idx = 0; idx < nfds; idx++)
- res |= pfds->revents & (POLLIN|POLLERR);
+ res |= pfds->revents & (POLLIN|POLLERR|POLLNVAL);
*revents = res;
return 0;
}
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
index d6ef9078..6fb8a196 100644
--- a/src/pcm/pcm.c
+++ b/src/pcm/pcm.c
@@ -1178,7 +1178,7 @@ int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int s
assert(pcm && pfds);
if (space >= 1 && pfds) {
pfds->fd = pcm->poll_fd;
- pfds->events = pcm->stream == SND_PCM_STREAM_PLAYBACK ? (POLLOUT|POLLERR) : (POLLIN|POLLERR);
+ pfds->events = pcm->stream == SND_PCM_STREAM_PLAYBACK ? (POLLOUT|POLLERR|POLLNVAL) : (POLLIN|POLLERR|POLLNVAL);
} else
return 0;
return 1;
diff --git a/src/rawmidi/rawmidi.c b/src/rawmidi/rawmidi.c
index a942435d..2a2726ed 100644
--- a/src/rawmidi/rawmidi.c
+++ b/src/rawmidi/rawmidi.c
@@ -411,7 +411,7 @@ int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rawmidi, struct pollfd *pfds, un
assert(rawmidi);
if (space >= 1) {
pfds->fd = rawmidi->poll_fd;
- pfds->events = rawmidi->stream == SND_RAWMIDI_STREAM_OUTPUT ? (POLLOUT|POLLERR) : (POLLIN|POLLERR);
+ pfds->events = rawmidi->stream == SND_RAWMIDI_STREAM_OUTPUT ? (POLLOUT|POLLERR|POLLNVAL) : (POLLIN|POLLERR|POLLNVAL);
return 1;
}
return 0;
diff --git a/src/seq/seq.c b/src/seq/seq.c
index 76885009..9c5f24dc 100644
--- a/src/seq/seq.c
+++ b/src/seq/seq.c
@@ -315,11 +315,11 @@ int snd_seq_poll_descriptors(snd_seq_t *seq, struct pollfd *pfds, unsigned int s
assert(seq);
if ((events & POLLIN) && space >= 1) {
assert(seq->streams & SND_SEQ_OPEN_INPUT);
- revents |= POLLIN|POLLERR;
+ revents |= POLLIN|POLLERR|POLLNVAL;
}
if ((events & POLLOUT) && space >= 1) {
assert(seq->streams & SND_SEQ_OPEN_OUTPUT);
- revents |= POLLOUT|POLLERR;
+ revents |= POLLOUT|POLLERR|POLLNVAL;
}
if (!revents)
return 0;
diff --git a/src/timer/timer.c b/src/timer/timer.c
index 1996b5b3..2fc05bc8 100644
--- a/src/timer/timer.c
+++ b/src/timer/timer.c
@@ -297,13 +297,13 @@ int snd_timer_poll_descriptors(snd_timer_t *timer, struct pollfd *pfds, unsigned
pfds->fd = timer->poll_fd;
switch (timer->mode & O_ACCMODE) {
case O_WRONLY:
- pfds->events = POLLOUT|POLLERR;
+ pfds->events = POLLOUT|POLLERR|POLLNVAL;
break;
case O_RDONLY:
- pfds->events = POLLIN|POLLERR;
+ pfds->events = POLLIN|POLLERR|POLLNVAL;
break;
case O_RDWR:
- pfds->events = POLLOUT|POLLIN|POLLERR;
+ pfds->events = POLLOUT|POLLIN|POLLERR|POLLNVAL;
break;
default:
return -EIO;