if (fd < 0)
return -errno;
}
-#if 0
- /*
- * this is bogus, an application have to care about open filedescriptors
- */
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
- SYSERR("fcntl FD_CLOEXEC failed");
- err = -errno;
- close(fd);
- return err;
- }
-#endif
if (ioctl(fd, SNDRV_CTL_IOCTL_PVERSION, &ver) < 0) {
err = -errno;
close(fd);
if (fd < 0)
return -errno;
}
-#if 0
- /*
- * this is bogus, an application have to care about open filedescriptors
- */
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
- SYSERR("fcntl FD_CLOEXEC failed");
- ret = -errno;
- close(fd);
- return ret;
- }
-#endif
if (ioctl(fd, SNDRV_HWDEP_IOCTL_PVERSION, &ver) < 0) {
ret = -errno;
close(fd);
if (fmode & O_ASYNC)
mode |= SND_PCM_ASYNC;
-#if 0
- /*
- * this is bogus, an application have to care about open filedescriptors
- */
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
- ret = -errno;
- SYSMSG("fcntl FD_CLOEXEC failed");
- close(fd);
- return ret;
- }
-#endif
-
if (ioctl(fd, SNDRV_PCM_IOCTL_PVERSION, &ver) < 0) {
ret = -errno;
SYSMSG("SNDRV_PCM_IOCTL_PVERSION failed");
return -errno;
}
}
-#if 0
- /*
- * this is bogus, an application have to care about open filedescriptors
- */
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
- SYSERR("fcntl FD_CLOEXEC failed");
- ret = -errno;
- close(fd);
- return ret;
- }
-#endif
if (ioctl(fd, SNDRV_RAWMIDI_IOCTL_PVERSION, &ver) < 0) {
ret = -errno;
SYSERR("SNDRV_RAWMIDI_IOCTL_PVERSION failed");
SYSERR("open %s failed", filename);
return -errno;
}
-#if 0
- /*
- * this is bogus, an application have to care about open filedescriptors
- */
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
- SYSERR("fcntl FD_CLOEXEC failed");
- ret = -errno;
- close(fd);
- return ret;
- }
-#endif
if (ioctl(fd, SNDRV_SEQ_IOCTL_PVERSION, &ver) < 0) {
SYSERR("SNDRV_SEQ_IOCTL_PVERSION failed");
ret = -errno;
fd = snd_open_device(SNDRV_FILE_TIMER, tmode);
if (fd < 0)
return -errno;
-#if 0
- /*
- * this is bogus, an application have to care about open filedescriptors
- */
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
- SYSERR("fcntl FD_CLOEXEC failed");
- ret = -errno;
- close(fd);
- return ret;
- }
-#endif
if (ioctl(fd, SNDRV_TIMER_IOCTL_PVERSION, &ver) < 0) {
ret = -errno;
close(fd);