Re: [PATCH 5/7] Backport the RHEL5 DriverDisc functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> > +int globErrFunc(const char *epath, int eerrno)
> > +{
> > +    /* TODO check fatal errors */
> > +
> > +    return 0;
> > +}
> 
> I think pjones's comments from
> https://www.redhat.com/archives/anaconda-devel-list/2009-December/msg00421.html
> still apply here.

No they don't as I said earlier. I _want_ to ignore most of the errors. The only errors we need to check here are out of memory and similar ones. And that is why I marked this TODO before. 

         return LOADER_BACK;
> > +    for (fnPtr = driverDiskFiles; *fnPtr; fnPtr++) {
> > +        snprintf(file, 200, "%s/%s/%s", mntpt, getProductArch(),
> *fnPtr);
> > +        if (access(file, R_OK)) {
> > +            logMessage(ERROR, "cannot find %s, bad driver disk",
> file);
> > +            return LOADER_BACK;
> > +        }
> > +    }
> >  
> >      return LOADER_OK;
> >  }
> 
> Likewise here.


Well pjones' comment said:

"I realize mntpt and getProductArch's return are unlikely to be very large, but
these should still probably be snprintf() or checked_asprintf() (... or sprintfa()
if it were to suddenly come into existence ;)"

And I see snprintf in the code. The checking could be more thorough, that is true. But it does use space limited version of sprintf.

Martin

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux