tech-userlevel archive

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

Re: savecore: default to -N /dev/ksyms?

On Fri, Mar 20, 2009 at 12:22:02PM -0400, Thor Lancelot Simon wrote:
> +             if (access(_PATH_KSYMS, R_OK) == 0) {

You want to use open() not access(), since you want to know whether
the open will suceed, not whether some check against the file
permisions reports 'success'.

For instance you probably wnat to know whether the device driver
will allow the open as well!


David Laight:

Home | Main Index | Thread Index | Old Index