Changeset 8860f103 in rtems


Ignore:
Timestamp:
Feb 20, 2003, 10:09:50 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
cd228d76
Parents:
d49389a
Message:

Patch against RTEMS-ss-20030128
Author: Till Straumann <strauman@…>

2003/2/11

This patch addresses the following issues:
2003-02-20 Till Straumann <strauman@…>

PR 349/bsps

  • src/mount.c, src/privateenv.c:
    • mount() bugfix: allocated 'loc' node must be released if

mount fails due to missing node_type_h

  • silence compiler warning about improper pointer type

Index: cpukit/libcsupport/src/mount.c
===================================================================
RCS file: /afs/slac/g/spear/cvsrep/rtems/src-20030128/cpukit/libcsupport/src/mount.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 mount.c
* cpukit/libcsupport/src/mount.c 29 Jan 2003 22:57:19 -0000 1.1.1.2
--- cpukit/libcsupport/src/mount.c 7 Feb 2003 20:47:49 -0000
*
* 142,147
--- 142,149 ----

mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 )

goto cleanup_and_bail;

+ loc_to_free = &loc;
+

/*

  • Test for node_type_h */

*
* 155,161

  • Test to see if it is a directory */
  • loc_to_free = &loc;

if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {

errno = ENOTDIR;
goto cleanup_and_bail;

--- 157,162 ----
Index: cpukit/libcsupport/src/privateenv.c
===================================================================
RCS file: /afs/slac/g/spear/cvsrep/rtems/src-20030128/cpukit/libcsupport/src/privateenv.c,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 privateenv.c
* cpukit/libcsupport/src/privateenv.c 29 Jan 2003 22:57:20 -0000 1.1.1.3
--- cpukit/libcsupport/src/privateenv.c 30 Jan 2003 18:01:40 -0000
*
* 65,71

tmp->refcnt = 1;

#endif

! sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);

if (sc != RTEMS_SUCCESSFUL) {

/* don't use free_user_env because the pathlocs are

  • not initialized yet

--- 65,71 ----

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
Location:
cpukit/libcsupport
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/ChangeLog

    rd49389a r8860f103  
     1Patch against RTEMS-ss-20030128
     2Author: Till Straumann <strauman@slac.stanford.edu>
     3
     42003/2/11
     5
     6This patch addresses the following issues:
     72003-02-20      Till Straumann <strauman@slac.stanford.edu>
     8
     9        PR 349/bsps
     10        * src/mount.c, src/privateenv.c:
     11            - mount() bugfix: allocated 'loc' node must be released if
     12                        mount fails due to missing node_type_h
     13            - silence compiler warning about improper pointer type
     14
     15Index: cpukit/libcsupport/src/mount.c
     16===================================================================
     17RCS file: /afs/slac/g/spear/cvsrep/rtems/src-20030128/cpukit/libcsupport/src/mount.c,v
     18retrieving revision 1.1.1.2
     19diff -c -r1.1.1.2 mount.c
     20*** cpukit/libcsupport/src/mount.c      29 Jan 2003 22:57:19 -0000      1.1.1.2
     21--- cpukit/libcsupport/src/mount.c      7 Feb 2003 20:47:49 -0000
     22***************
     23*** 142,147 ****
     24--- 142,149 ----
     25              mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 )
     26        goto cleanup_and_bail;
     27 
     28+     loc_to_free = &loc;
     29+
     30      /*
     31       * Test for node_type_h
     32       */
     33***************
     34*** 155,161 ****
     35       *  Test to see if it is a directory
     36       */
     37 
     38-     loc_to_free = &loc;
     39      if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
     40        errno = ENOTDIR;
     41        goto cleanup_and_bail;
     42--- 157,162 ----
     43Index: cpukit/libcsupport/src/privateenv.c
     44===================================================================
     45RCS file: /afs/slac/g/spear/cvsrep/rtems/src-20030128/cpukit/libcsupport/src/privateenv.c,v
     46retrieving revision 1.1.1.3
     47diff -c -r1.1.1.3 privateenv.c
     48*** cpukit/libcsupport/src/privateenv.c 29 Jan 2003 22:57:20 -0000      1.1.1.3
     49--- cpukit/libcsupport/src/privateenv.c 30 Jan 2003 18:01:40 -0000
     50***************
     51*** 65,71 ****
     52     tmp->refcnt = 1;
     53  #endif
     54 
     55!    sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
     56     if (sc != RTEMS_SUCCESSFUL) {
     57         /* don't use free_user_env because the pathlocs are
     58          * not initialized yet
     59--- 65,71 ----
     60     tmp->refcnt = 1;
     61  #endif
     62 
     63!    sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
     64     if (sc != RTEMS_SUCCESSFUL) {
     65         /* don't use free_user_env because the pathlocs are
     66          * not initialized yet
    1672003-02-20      Wolfram Wadepohl <W.Wadepohl@indumat.de>
    268
  • cpukit/libcsupport/src/mount.c

    rd49389a r8860f103  
    143143      goto cleanup_and_bail;
    144144
     145    loc_to_free = &loc;
     146
    145147    /*
    146148     * Test for node_type_h
     
    156158     */
    157159
    158     loc_to_free = &loc;
    159160    if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
    160161      errno = ENOTDIR;
  • cpukit/libcsupport/src/privateenv.c

    rd49389a r8860f103  
    6666#endif
    6767
    68    sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
     68   sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
    6969   if (sc != RTEMS_SUCCESSFUL) {
    7070         /* don't use free_user_env because the pathlocs are
Note: See TracChangeset for help on using the changeset viewer.