change log for rtems (2010-07-07)
rtems-vc at rtems.org
rtems-vc at rtems.org
Wed Jul 7 16:29:45 UTC 2010
*joel*:
2010-07-07 Joel Sherrill <joel.sherrill at oarcorp.com>
* libcsupport/src/open.c: Formatting and improve comment.
M 1.2494 cpukit/ChangeLog
M 1.26 cpukit/libcsupport/src/open.c
diff -u rtems/cpukit/ChangeLog:1.2493 rtems/cpukit/ChangeLog:1.2494
--- rtems/cpukit/ChangeLog:1.2493 Wed Jul 7 09:06:51 2010
+++ rtems/cpukit/ChangeLog Wed Jul 7 10:55:20 2010
@@ -1,5 +1,9 @@
2010-07-07 Joel Sherrill <joel.sherrill at oarcorp.com>
+ * libcsupport/src/open.c: Formatting and improve comment.
+
+2010-07-07 Joel Sherrill <joel.sherrill at oarcorp.com>
+
PR 1606/cpukit
* score/include/rtems/score/interr.h: Remove
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS since it is not generated.
diff -u rtems/cpukit/libcsupport/src/open.c:1.25 rtems/cpukit/libcsupport/src/open.c:1.26
--- rtems/cpukit/libcsupport/src/open.c:1.25 Thu Jul 1 10:12:37 2010
+++ rtems/cpukit/libcsupport/src/open.c Wed Jul 7 10:55:22 2010
@@ -1,7 +1,7 @@
/*
* open() - POSIX 1003.1 5.3.1 - Open a File
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -72,11 +72,9 @@
rtems_filesystem_location_info_t *loc_to_free = NULL;
int eval_flags;
-
/*
* Set the Evaluation flags
*/
-
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
@@ -109,7 +107,6 @@
/*
* See if the file exists.
*/
-
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
@@ -132,8 +129,13 @@
goto done;
}
- /* Sanity check to see if the file name exists after the mknod() */
- status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
+ /*
+ * After we do the mknod(), we have to evaluate the path to get the
+ * "loc" structure needed to actually have the file itself open.
+ * So we created it, and then we need to have "look it up."
+ */
+ status = rtems_filesystem_evaluate_path(
+ pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
@@ -152,7 +154,6 @@
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
-
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
@@ -167,7 +168,6 @@
/*
* Optionally truncate the file.
*/
-
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
@@ -182,7 +182,6 @@
/*
* Single exit and clean up path.
*/
-
done:
va_end(ap);
--
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/20100707/b2f1300c/attachment-0001.html>
More information about the vc
mailing list