From: Ben Gras Date: Thu, 12 Dec 2013 12:50:23 +0000 (+0100) Subject: , remove O_REOPEN X-Git-Tag: v3.3.0~451 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch01.html?a=commitdiff_plain;h=a1e1ae5aded277011a8a5b916490c924d6096182;p=minix.git , remove O_REOPEN Change-Id: Id6493f30bb0fec7460d01f357ada9b2c2a4f5eb7 --- diff --git a/commands/playwave/playwave.c b/commands/playwave/playwave.c index 28bdbf588..3a59e780a 100644 --- a/commands/playwave/playwave.c +++ b/commands/playwave/playwave.c @@ -73,7 +73,7 @@ int open_audio(unsigned int *fragment_size, unsigned int channels, int audio; /* Open DSP */ - if ((audio = open("/dev/audio", O_RDWR | O_REOPEN)) < 0) + if ((audio = open("/dev/audio", O_RDWR)) < 0) { printf("Cannot open /dev/audio: %s\n", strerror(errno)); exit(-1); diff --git a/servers/vfs/misc.c b/servers/vfs/misc.c index b78bf6a63..7ff9dd4f0 100644 --- a/servers/vfs/misc.c +++ b/servers/vfs/misc.c @@ -148,7 +148,7 @@ int do_fcntl(void) case F_SETFL: /* Set file status flags (O_NONBLOCK and O_APPEND). */ - fl = O_NONBLOCK | O_APPEND | O_REOPEN; + fl = O_NONBLOCK | O_APPEND; f->filp_flags = (f->filp_flags & ~fl) | (fcntl_argx & fl); break; diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h index b8cce9577..b81ab3f32 100644 --- a/sys/sys/fcntl.h +++ b/sys/sys/fcntl.h @@ -121,10 +121,6 @@ #define O_NOSIGPIPE 0x01000000 /* don't deliver sigpipe */ #endif -#ifdef __minix -#define O_REOPEN 0x10000000 /* automatically re-open after driver crash */ -#endif - #ifdef _KERNEL /* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */ #define FFLAGS(oflags) ((oflags) + 1) @@ -197,10 +193,6 @@ #define F_SETNOSIGPIPE 14 /* set SIGPIPE disposition */ #endif -#ifdef __minix -#define F_FREESP 100 -#endif - /* file descriptor flags (F_GETFD, F_SETFD) */ #define FD_CLOEXEC 1 /* close-on-exec flag */ @@ -327,4 +319,8 @@ int openat(int, const char *, int oflags, ...); __END_DECLS #endif /* !_KERNEL */ +#ifdef __minix +#define F_FREESP 100 +#endif + #endif /* !_SYS_FCNTL_H_ */