mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Remove old commented-out FD_CLOEXEC code
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									8264b2fd0a
								
							
						
					
					
						commit
						57ce918928
					
				
					 6 changed files with 0 additions and 67 deletions
				
			
		| 
						 | 
					@ -392,17 +392,6 @@ int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode)
 | 
				
			||||||
		if (fd < 0)
 | 
							if (fd < 0)
 | 
				
			||||||
			return -errno;
 | 
								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) {
 | 
						if (ioctl(fd, SNDRV_CTL_IOCTL_PVERSION, &ver) < 0) {
 | 
				
			||||||
		err = -errno;
 | 
							err = -errno;
 | 
				
			||||||
		close(fd);
 | 
							close(fd);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -122,17 +122,6 @@ int snd_hwdep_hw_open(snd_hwdep_t **handle, const char *name, int card, int devi
 | 
				
			||||||
		if (fd < 0)
 | 
							if (fd < 0)
 | 
				
			||||||
			return -errno;
 | 
								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) {
 | 
						if (ioctl(fd, SNDRV_HWDEP_IOCTL_PVERSION, &ver) < 0) {
 | 
				
			||||||
		ret = -errno;
 | 
							ret = -errno;
 | 
				
			||||||
		close(fd);
 | 
							close(fd);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1144,18 +1144,6 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name,
 | 
				
			||||||
	if (fmode & O_ASYNC)
 | 
						if (fmode & O_ASYNC)
 | 
				
			||||||
		mode |= SND_PCM_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) {
 | 
						if (ioctl(fd, SNDRV_PCM_IOCTL_PVERSION, &ver) < 0) {
 | 
				
			||||||
		ret = -errno;
 | 
							ret = -errno;
 | 
				
			||||||
		SYSMSG("SNDRV_PCM_IOCTL_PVERSION failed");
 | 
							SYSMSG("SNDRV_PCM_IOCTL_PVERSION failed");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -234,17 +234,6 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
 | 
				
			||||||
			return -errno;
 | 
								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) {
 | 
						if (ioctl(fd, SNDRV_RAWMIDI_IOCTL_PVERSION, &ver) < 0) {
 | 
				
			||||||
		ret = -errno;
 | 
							ret = -errno;
 | 
				
			||||||
		SYSERR("SNDRV_RAWMIDI_IOCTL_PVERSION failed");
 | 
							SYSERR("SNDRV_RAWMIDI_IOCTL_PVERSION failed");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -457,17 +457,6 @@ int snd_seq_hw_open(snd_seq_t **handle, const char *name, int streams, int mode)
 | 
				
			||||||
		SYSERR("open %s failed", filename);
 | 
							SYSERR("open %s failed", filename);
 | 
				
			||||||
		return -errno;
 | 
							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) {
 | 
						if (ioctl(fd, SNDRV_SEQ_IOCTL_PVERSION, &ver) < 0) {
 | 
				
			||||||
		SYSERR("SNDRV_SEQ_IOCTL_PVERSION failed");
 | 
							SYSERR("SNDRV_SEQ_IOCTL_PVERSION failed");
 | 
				
			||||||
		ret = -errno;
 | 
							ret = -errno;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -236,17 +236,6 @@ int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int
 | 
				
			||||||
	fd = snd_open_device(SNDRV_FILE_TIMER, tmode);
 | 
						fd = snd_open_device(SNDRV_FILE_TIMER, tmode);
 | 
				
			||||||
	if (fd < 0)
 | 
						if (fd < 0)
 | 
				
			||||||
		return -errno;
 | 
							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) {
 | 
						if (ioctl(fd, SNDRV_TIMER_IOCTL_PVERSION, &ver) < 0) {
 | 
				
			||||||
		ret = -errno;
 | 
							ret = -errno;
 | 
				
			||||||
		close(fd);
 | 
							close(fd);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue