<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-08-29)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-08-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
* libcsupport/src/getlogin.c: Modify to use strncpy() on all paths.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2617&r2=text&tr2=1.2618&diff_format=h">M</a></td><td width='1%'>1.2618</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/getlogin.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libcsupport/src/getlogin.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2617 rtems/cpukit/ChangeLog:1.2618
--- rtems/cpukit/ChangeLog:1.2617 Sat Aug 28 15:10:00 2010
+++ rtems/cpukit/ChangeLog Sun Aug 29 14:48:52 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-08-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ * libcsupport/src/getlogin.c: Modify to use strncpy() on all paths.
+
</font> 2010-08-28 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1694/shell
<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/getlogin.c:1.3 rtems/cpukit/libcsupport/src/getlogin.c:1.4
--- rtems/cpukit/libcsupport/src/getlogin.c:1.3 Mon Jul 5 16:31:56 2010
+++ rtems/cpukit/libcsupport/src/getlogin.c Sun Aug 29 14:48:52 2010
</font><font color='#997700'>@@ -41,6 +41,7 @@
</font> )
{
struct passwd *pw;
<font color='#000088'>+ char *pname;
</font>
if ( !name )<span style="background-color: #FF0000"> </span>
return EFAULT;
<font color='#997700'>@@ -48,11 +49,13 @@
</font> if ( namesize < LOGIN_NAME_MAX )
return ERANGE;
<font color='#000088'>+ /* Set the pointer to a default name */
+ pname = "";
+
</font> pw = getpwuid(getuid());
<font color='#880000'>- if ( !pw ) {
- strcpy( name, "" );
- } else {
- strncpy( name, pw->pw_name, LOGIN_NAME_MAX );
- }
</font><font color='#000088'>+ if ( pw )
+ pname = pw->pw_name;
+
+ strncpy( name, pname, LOGIN_NAME_MAX );
</font> return 0;
}
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-08-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
* libcsupport/src/privateenv.c: Add macro to test status when
RTEMS_DEBUG is enabled. Note than evaluation of root directory should
always work.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2618&r2=text&tr2=1.2619&diff_format=h">M</a></td><td width='1%'>1.2619</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/privateenv.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>cpukit/libcsupport/src/privateenv.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2618 rtems/cpukit/ChangeLog:1.2619
--- rtems/cpukit/ChangeLog:1.2618 Sun Aug 29 14:48:52 2010
+++ rtems/cpukit/ChangeLog Sun Aug 29 14:49:52 2010
</font><font color='#997700'>@@ -1,5 +1,11 @@
</font> 2010-08-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
<font color='#000088'>+ * libcsupport/src/privateenv.c: Add macro to test status when
+ RTEMS_DEBUG is enabled. Note than evaluation of root directory should
+ always work.
+
+2010-08-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font> * libcsupport/src/getlogin.c: Modify to use strncpy() on all paths.
2010-08-28 Joel Sherrill <joel.sherrill@oarcorp.com>
<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/privateenv.c:1.15 rtems/cpukit/libcsupport/src/privateenv.c:1.16
--- rtems/cpukit/libcsupport/src/privateenv.c:1.15 Thu Jul 29 17:27:12 2010
+++ rtems/cpukit/libcsupport/src/privateenv.c Sun Aug 29 14:49:52 2010
</font><font color='#997700'>@@ -24,6 +24,13 @@
</font> #include <rtems/libio.h>
#include <rtems/libio_.h>
<font color='#000088'>+#if defined(RTEMS_DEBUG)
+ #define CHECK_STATUS(_x) assert((_x) == )
+ #include <assert.h>
+#else
+ #define CHECK_STATUS(_x) _x
+#endif
+
</font> /* cleanup a user environment
* NOTE: this must be called with
* thread dispatching disabled!
<font color='#997700'>@@ -33,15 +40,15 @@
</font> {
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
<font color='#880000'>- if (env != &rtems_global_user_env
-#ifdef HAVE_USERENV_REFCNT
- && --env->refcnt <= 0
-#endif
</font><font color='#000088'>+ if (env != &rtems_global_user_env
+ #ifdef HAVE_USERENV_REFCNT
+ && --env->refcnt <= 0
+ #endif
</font> ) {
<font color='#880000'>- rtems_filesystem_freenode( &env->current_directory);
- rtems_filesystem_freenode( &env->root_directory);
- free(env);
- }
</font><font color='#000088'>+ rtems_filesystem_freenode( &env->current_directory);
+ rtems_filesystem_freenode( &env->root_directory);
+ free(env);
+ }
</font> }
rtems_status_code rtems_libio_set_private_env(void)
<font color='#997700'>@@ -67,50 +74,53 @@
</font>
if (rtems_current_user_env==&rtems_global_user_env ||<span style="background-color: #FF0000"> </span>
rtems_current_user_env->task_id != task_id ) {
<font color='#880000'>- rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
- if (!tmp)
- return RTEMS_NO_MEMORY;
-
-#ifdef HAVE_USERENV_REFCNT
- tmp->refcnt = 1;
-#endif
-
- sc = rtems_task_variable_add(
- RTEMS_SELF,
- (void*)&rtems_current_user_env,
- (void(*)(void *))free_user_env
- );
- if (sc != RTEMS_SUCCESSFUL) {
- /* don't use free_user_env because the pathlocs are
- * not initialized yet
- */
- free(tmp);
- return sc;
- }
- rtems_current_user_env = tmp;
</font><font color='#000088'>+ rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
+ if (!tmp)
+ return RTEMS_NO_MEMORY;
+
+ #ifdef HAVE_USERENV_REFCNT
+ tmp->refcnt = 1;
+ #endif
+
+ sc = rtems_task_variable_add(
+ RTEMS_SELF,
+ (void*)&rtems_current_user_env,
+ (void(*)(void *))free_user_env
+ );
+ if (sc != RTEMS_SUCCESSFUL) {
+ /* don't use free_user_env because the pathlocs are
+ * not initialized yet
+ */
+ free(tmp);
+ return sc;
+ }
+ rtems_current_user_env = tmp;
</font> }
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
<font color='#880000'>- /* Clone the pathlocs. In contrast to most other
- * code we must _not_ free the original locs because
- * what we are trying to do here is forking off
- * clones. The reason is a pathloc can be allocated by the
- * file system and needs to be freed when deleting the environment.
</font><font color='#000088'>+ /* Clone the pathlocs. In contrast to most other code we must _not_
+ * free the original locs because what we are trying to do here is forking
+ * off clones. The reason is a pathloc can be allocated by the file system
+ * and needs to be freed when deleting the environment.
+ *
+ * NOTE: Evaluation should always work so only check status when debug
+ * is enabled.
</font> */
<font color='#880000'>- rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
</font><font color='#000088'>+ CHECK_STATUS( rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0) );
</font> rtems_filesystem_root = loc;
<font color='#880000'>- rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
</font><font color='#000088'>+
+ CHECK_STATUS( rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0) );
</font> rtems_filesystem_current = loc;
return RTEMS_SUCCESSFUL;
}
/*
<font color='#880000'>- * Share a same private environment beetween two task:
- * Task_id (remote) and RTEMS_SELF(current).
</font><font color='#000088'>+ * Share the same private environment between two tasks:
+ * Task_id (remote) and RTEMS_SELF(current).
</font> */
/* NOTE:
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-08-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
* posix/src/killinfo.c: Ensure interested is non-NULL before using it.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2619&r2=text&tr2=1.2620&diff_format=h">M</a></td><td width='1%'>1.2620</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/killinfo.c.diff?r1=text&tr1=1.25&r2=text&tr2=1.26&diff_format=h">M</a></td><td width='1%'>1.26</td><td width='100%'>cpukit/posix/src/killinfo.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2619 rtems/cpukit/ChangeLog:1.2620
--- rtems/cpukit/ChangeLog:1.2619 Sun Aug 29 14:49:52 2010
+++ rtems/cpukit/ChangeLog Sun Aug 29 14:50:33 2010
</font><font color='#997700'>@@ -1,5 +1,9 @@
</font> 2010-08-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
<font color='#000088'>+ * posix/src/killinfo.c: Ensure interested is non-NULL before using it.
+
+2010-08-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font> * libcsupport/src/privateenv.c: Add macro to test status when
RTEMS_DEBUG is enabled. Note than evaluation of root directory should
always work.
<font color='#006600'>diff -u rtems/cpukit/posix/src/killinfo.c:1.25 rtems/cpukit/posix/src/killinfo.c:1.26
--- rtems/cpukit/posix/src/killinfo.c:1.25 Mon Jun 28 19:34:10 2010
+++ rtems/cpukit/posix/src/killinfo.c Sun Aug 29 14:50:33 2010
</font><font color='#997700'>@@ -265,7 +265,7 @@
</font> * If the interested thread is ready, don't think about changing.
*/
<font color='#880000'>- if ( !_States_Is_ready( interested->current_state ) ) {
</font><font color='#000088'>+ if ( interested && !_States_Is_ready( interested->current_state ) ) {
</font> /* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>