change log for rtems (2011-07-24)

rtems-vc at rtems.org rtems-vc at rtems.org
Sun Jul 24 21:12:02 UTC 2011


 *joel* (on branch rtems-4-9-branch):
2011-07-24	Joel Sherrill <joel.sherrilL at OARcorp.com>

	PR 1839/filesystem
	* libcsupport/include/rtems/libio_.h, libcsupport/src/fchdir.c,
	libcsupport/src/fdatasync.c, libcsupport/src/fpathconf.c,
	libcsupport/src/fsync.c, libcsupport/src/read.c,
	libcsupport/src/readv.c, libcsupport/src/write.c,
	libcsupport/src/writev.c: Some calls did not return proper status for
	permission errors or incorrectly permissions at all.

M 1.1539.2.78  cpukit/ChangeLog
M 1.28.2.2  cpukit/libcsupport/include/rtems/libio_.h
M 1.8.6.1  cpukit/libcsupport/src/fchdir.c
M 1.10.6.1  cpukit/libcsupport/src/fdatasync.c
M 1.9.6.1  cpukit/libcsupport/src/fpathconf.c
M 1.11.6.1  cpukit/libcsupport/src/fsync.c
M 1.13.2.1  cpukit/libcsupport/src/read.c
M 1.2.2.1  cpukit/libcsupport/src/readv.c
M 1.16.2.1  cpukit/libcsupport/src/write.c
M 1.2.2.1  cpukit/libcsupport/src/writev.c

diff -u rtems/cpukit/ChangeLog:1.1539.2.77 rtems/cpukit/ChangeLog:1.1539.2.78
--- rtems/cpukit/ChangeLog:1.1539.2.77	Tue Jul 19 08:14:16 2011
+++ rtems/cpukit/ChangeLog	Sun Jul 24 15:26:12 2011
@@ -1,3 +1,13 @@
+2011-07-24	Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+	PR 1839/filesystem
+	* libcsupport/include/rtems/libio_.h, libcsupport/src/fchdir.c,
+	libcsupport/src/fdatasync.c, libcsupport/src/fpathconf.c,
+	libcsupport/src/fsync.c, libcsupport/src/read.c,
+	libcsupport/src/readv.c, libcsupport/src/write.c,
+	libcsupport/src/writev.c: Some calls did not return proper status for
+	permission errors or incorrectly permissions at all.
+
 2011-07-19	Joel Sherrill <joel.sherrilL at OARcorp.com>
 
 	PR 1838/filesystem

diff -u rtems/cpukit/libcsupport/include/rtems/libio_.h:1.28.2.1 rtems/cpukit/libcsupport/include/rtems/libio_.h:1.28.2.2
--- rtems/cpukit/libcsupport/include/rtems/libio_.h:1.28.2.1	Tue Jun  2 22:40:06 2009
+++ rtems/cpukit/libcsupport/include/rtems/libio_.h	Sun Jul 24 15:26:13 2011
@@ -124,20 +124,31 @@
   } while (0)
 
 /*
- *  rtems_libio_check_permissions
+ *  rtems_libio_check_permissions_with_error
  *
  *  Macro to check if a file descriptor is open for this operation.
+ *  On failure, return the user specified error.
  */
 
-#define rtems_libio_check_permissions(_iop, _flag)    \
-  do {                                                \
-      if (((_iop)->flags & (_flag)) == 0) {           \
-            rtems_set_errno_and_return_minus_one( EINVAL ); \
-            return -1;                                \
-      }                                               \
+#define rtems_libio_check_permissions_with_error(_iop, _flag, _errno) \
+  do {                                                      \
+      if (((_iop)->flags & (_flag)) == 0) {                 \
+            rtems_set_errno_and_return_minus_one( _errno ); \
+            return -1;                                      \
+      }                                                     \
   } while (0)
 
 /*
+ *  rtems_libio_check_permissions
+ *
+ *  Macro to check if a file descriptor is open for this operation.
+ *  On failure, return EINVAL
+ */
+
+#define rtems_libio_check_permissions(_iop, _flag) \
+   rtems_libio_check_permissions_with_error(_iop, _flag, EINVAL )
+
+/*
  *  rtems_filesystem_freenode
  *
  *  Macro to free a node.

diff -u rtems/cpukit/libcsupport/src/fchdir.c:1.8 rtems/cpukit/libcsupport/src/fchdir.c:1.8.6.1
--- rtems/cpukit/libcsupport/src/fchdir.c:1.8	Sun Apr 18 01:05:34 2004
+++ rtems/cpukit/libcsupport/src/fchdir.c	Sun Jul 24 15:26:14 2011
@@ -1,7 +1,7 @@
 /*
  *  fchdir() - compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
  *
- *  COPYRIGHT (c) 1989-2000.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -36,12 +36,6 @@
   rtems_libio_check_is_open(iop);
 
   /*
-   *  Now process the fchmod().
-   */
-
-  rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
-
-  /*
    * Verify you can change directory into this node.
    */
 

diff -u rtems/cpukit/libcsupport/src/fdatasync.c:1.10 rtems/cpukit/libcsupport/src/fdatasync.c:1.10.6.1
--- rtems/cpukit/libcsupport/src/fdatasync.c:1.10	Thu Sep  4 13:54:13 2003
+++ rtems/cpukit/libcsupport/src/fdatasync.c	Sun Jul 24 15:26:14 2011
@@ -1,7 +1,7 @@
 /*
  *  fdatasync() - POSIX 1003.1b 6.6.2 - Synchronize the Data of a File
  *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -29,7 +29,7 @@
   rtems_libio_check_fd( fd );
   iop = rtems_libio_iop( fd );
   rtems_libio_check_is_open(iop);
-  rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
+  rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
 
   /*
    *  Now process the fdatasync().

diff -u rtems/cpukit/libcsupport/src/fpathconf.c:1.9 rtems/cpukit/libcsupport/src/fpathconf.c:1.9.6.1
--- rtems/cpukit/libcsupport/src/fpathconf.c:1.9	Thu Sep  4 13:54:13 2003
+++ rtems/cpukit/libcsupport/src/fpathconf.c	Sun Jul 24 15:26:14 2011
@@ -1,7 +1,7 @@
 /*
  *  fpathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables
  *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -33,7 +33,6 @@
   rtems_libio_check_fd(fd);
   iop = rtems_libio_iop(fd);
   rtems_libio_check_is_open(iop);
-  rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
 
   /*
    *  Now process the information request.

diff -u rtems/cpukit/libcsupport/src/fsync.c:1.11 rtems/cpukit/libcsupport/src/fsync.c:1.11.6.1
--- rtems/cpukit/libcsupport/src/fsync.c:1.11	Thu Sep  4 13:54:13 2003
+++ rtems/cpukit/libcsupport/src/fsync.c	Sun Jul 24 15:26:14 2011
@@ -1,7 +1,7 @@
 /*
  *  fsync() - POSIX 1003.1b 6.6.1 - Synchronize the State of a File
  *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -29,7 +29,6 @@
   rtems_libio_check_fd( fd );
   iop = rtems_libio_iop( fd );
   rtems_libio_check_is_open(iop);
-  rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
 
   /*
    *  Now process the fsync().

diff -u rtems/cpukit/libcsupport/src/read.c:1.13 rtems/cpukit/libcsupport/src/read.c:1.13.2.1
--- rtems/cpukit/libcsupport/src/read.c:1.13	Thu Sep 20 17:25:14 2007
+++ rtems/cpukit/libcsupport/src/read.c	Sun Jul 24 15:26:14 2011
@@ -1,7 +1,7 @@
 /*
  *  read() - POSIX 1003.1b 6.4.1 - Read From a File
  *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -32,7 +32,7 @@
   rtems_libio_check_is_open( iop );
   rtems_libio_check_buffer( buffer );
   rtems_libio_check_count( count );
-  rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
+  rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
 
   /*
    *  Now process the read().

diff -u rtems/cpukit/libcsupport/src/readv.c:1.2 rtems/cpukit/libcsupport/src/readv.c:1.2.2.1
--- rtems/cpukit/libcsupport/src/readv.c:1.2	Mon Sep  1 06:42:19 2008
+++ rtems/cpukit/libcsupport/src/readv.c	Sun Jul 24 15:26:14 2011
@@ -5,7 +5,7 @@
  *
  *  http://www.opengroup.org/onlinepubs/009695399/functions/readv.html
  *
- *  COPYRIGHT (c) 1989-2007.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -40,7 +40,7 @@
   rtems_libio_check_fd( fd );
   iop = rtems_libio_iop( fd );
   rtems_libio_check_is_open( iop );
-  rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
+  rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
 
   /*
    *  Argument validation on IO vector

diff -u rtems/cpukit/libcsupport/src/write.c:1.16 rtems/cpukit/libcsupport/src/write.c:1.16.2.1
--- rtems/cpukit/libcsupport/src/write.c:1.16	Thu Sep 20 17:25:14 2007
+++ rtems/cpukit/libcsupport/src/write.c	Sun Jul 24 15:26:14 2011
@@ -1,7 +1,7 @@
 /*
  *  write() - POSIX 1003.1b 6.4.2 - Write to a File
  *
- *  COPYRIGHT (c) 1989-2007.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -39,7 +39,7 @@
   rtems_libio_check_is_open( iop );
   rtems_libio_check_buffer( buffer );
   rtems_libio_check_count( count );
-  rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
+  rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
 
   /*
    *  Now process the write() request.

diff -u rtems/cpukit/libcsupport/src/writev.c:1.2 rtems/cpukit/libcsupport/src/writev.c:1.2.2.1
--- rtems/cpukit/libcsupport/src/writev.c:1.2	Mon Sep  1 06:42:19 2008
+++ rtems/cpukit/libcsupport/src/writev.c	Sun Jul 24 15:26:14 2011
@@ -5,7 +5,7 @@
  *
  *  http://www.opengroup.org/onlinepubs/009695399/functions/writev.html
  *
- *  COPYRIGHT (c) 1989-2007.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -41,7 +41,7 @@
   rtems_libio_check_fd( fd );
   iop = rtems_libio_iop( fd );
   rtems_libio_check_is_open( iop );
-  rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
+  rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
 
   /*
    *  Argument validation on IO vector


 *joel* (on branch rtems-4-9-branch):
Upgrade to 4.9.6

M 1.149.2.7  VERSION
M 1.27.2.7  aclocal/version.m4
M 1.13.2.7  c/src/aclocal/version.m4
M 1.24.2.7  cpukit/aclocal/version.m4
M 1.13.2.7  testsuites/aclocal/version.m4

diff -u rtems/VERSION:1.149.2.6 rtems/VERSION:1.149.2.7
--- rtems/VERSION:1.149.2.6	Wed Feb  9 12:16:33 2011
+++ rtems/VERSION	Sun Jul 24 15:26:55 2011
@@ -4,4 +4,4 @@
 #  $Id$
 #
 
-RTEMS Version 4.9.5
+RTEMS Version 4.9.6

diff -u rtems/aclocal/version.m4:1.27.2.6 rtems/aclocal/version.m4:1.27.2.7
--- rtems/aclocal/version.m4:1.27.2.6	Wed Feb  9 12:16:33 2011
+++ rtems/aclocal/version.m4	Sun Jul 24 15:26:54 2011
@@ -1,4 +1,4 @@
 AC_DEFUN([RTEMS_VERSIONING],
-m4_define([_RTEMS_VERSION],[4.9.5]))
+m4_define([_RTEMS_VERSION],[4.9.6]))
 
 m4_define([RTEMS_API],[4.9])

diff -u rtems/c/src/aclocal/version.m4:1.13.2.6 rtems/c/src/aclocal/version.m4:1.13.2.7
--- rtems/c/src/aclocal/version.m4:1.13.2.6	Wed Feb  9 12:16:33 2011
+++ rtems/c/src/aclocal/version.m4	Sun Jul 24 15:26:55 2011
@@ -1,4 +1,4 @@
 AC_DEFUN([RTEMS_VERSIONING],
-m4_define([_RTEMS_VERSION],[4.9.5]))
+m4_define([_RTEMS_VERSION],[4.9.6]))
 
 m4_define([RTEMS_API],[4.9])

diff -u rtems/cpukit/aclocal/version.m4:1.24.2.6 rtems/cpukit/aclocal/version.m4:1.24.2.7
--- rtems/cpukit/aclocal/version.m4:1.24.2.6	Wed Feb  9 12:16:33 2011
+++ rtems/cpukit/aclocal/version.m4	Sun Jul 24 15:26:55 2011
@@ -1,4 +1,4 @@
 AC_DEFUN([RTEMS_VERSIONING],
-m4_define([_RTEMS_VERSION],[4.9.5]))
+m4_define([_RTEMS_VERSION],[4.9.6]))
 
 m4_define([RTEMS_API],[4.9])

diff -u rtems/testsuites/aclocal/version.m4:1.13.2.6 rtems/testsuites/aclocal/version.m4:1.13.2.7
--- rtems/testsuites/aclocal/version.m4:1.13.2.6	Wed Feb  9 12:16:33 2011
+++ rtems/testsuites/aclocal/version.m4	Sun Jul 24 15:26:55 2011
@@ -1,4 +1,4 @@
 AC_DEFUN([RTEMS_VERSIONING],
-m4_define([_RTEMS_VERSION],[4.9.5]))
+m4_define([_RTEMS_VERSION],[4.9.6]))
 
 m4_define([RTEMS_API],[4.9])



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110724/5871ead0/attachment-0001.html>


More information about the vc mailing list