[Cbe-oss-dev] [PATCH] libspe2: opening null file returns no error

D. Herrendoerfer d.herrendoerfer at herrendoerfer.name
Fri Nov 23 00:55:29 EST 2007


I briefly passed over the other functions in the c99 handlers, 
but apart from freopen things look ok to me.
Changes are on subversion as revision 99.

Regards,

Dirk
On Tue, 2007-11-20 at 22:56 +0900, Kazunori Asayama wrote:
> D. Herrendoerfer wrote:
> > This patch fixes a problem that opening a null file would
> > return no error.
> > 
> > Signed-off-by: D. Herrendoerfer <herrend at de.ibm.com>
> > 
> > OK to apply ?
> 
> OK with me. And I guess that the freopen and other C99 handlers 
> have the same problem. Could you look into them?
> 
> > 
> > Index: libspe2/spebase/default_c99_handler.c
> > ===================================================================
> > --- libspe2/spebase/default_c99_handler.c       (revision 95)
> > +++ libspe2/spebase/default_c99_handler.c       (working copy)
> > @@ -919,8 +919,8 @@ static int default_c99_handler_fopen(cha
> >      int i, rc = 0, err = EMFILE;
> >  
> >      DEBUG_PRINTF("%s\n", __func__);
> > -    path = GET_LS_PTR(arg0->slot[0]);
> > -    mode = GET_LS_PTR(arg1->slot[0]);
> > +    path = GET_LS_PTR_NULL(arg0->slot[0]);
> > +    mode = GET_LS_PTR_NULL(arg1->slot[0]);
> >      pthread_mutex_lock(&spe_c99_file_mutex);
> >      if (nr_spe_FILE_ptrs < SPE_FOPEN_MAX) {
> >         for (i = SPE_FOPEN_MIN; i < SPE_FOPEN_MAX; i++) {
> > 
> > 
> > _______________________________________________
> > cbe-oss-dev mailing list
> > cbe-oss-dev at ozlabs.org
> > https://ozlabs.org/mailman/listinfo/cbe-oss-dev
> > 
> > 




More information about the cbe-oss-dev mailing list