svn commit: r268926 - head/lib/libc/stdio

看板FB_svn作者時間11年前 (2014/07/21 04:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
Author: pfg Date: Sun Jul 20 20:14:15 2014 New Revision: 268926 URL: http://svnweb.freebsd.org/changeset/base/268926 Log: Use a correct errno in freopen. Use EBADF instead of EINVAL when working around incorrect O_ACCMODE. Phabric: D442 Obtained from: Apple Inc. (Libc 997.90.3) Reviewed by: jilles MFC after: 1 week Modified: head/lib/libc/stdio/freopen.c Modified: head/lib/libc/stdio/freopen.c ============================================================================== --- head/lib/libc/stdio/freopen.c Sun Jul 20 20:11:34 2014 (r268925) +++ head/lib/libc/stdio/freopen.c Sun Jul 20 20:14:15 2014 (r268926) @@ -97,7 +97,7 @@ freopen(const char * __restrict file, co (dflags & (O_ACCMODE | O_EXEC)) != (oflags & O_ACCMODE)) { fclose(fp); FUNLOCKFILE(fp); - errno = EINVAL; + errno = EBADF; return (NULL); } if (fp->_flags & __SWR) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
文章代碼(AID): #1Jp2T3SG (FB_svn)