tech-kern archive

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

Re: options MODULAR improvements phase 0.5



In article <20090523143101.GC13220%hairylemon.org@localhost>,
Andrew Doran  <ad%netbsd.org@localhost> wrote:
>On Fri, May 22, 2009 at 05:33:46PM -0700, John Nemeth wrote:
>
>> @@ -616,11 +617,21 @@
>>                         depth--;
>>                         return ENOMEM;
>>                 }
>> -               error = kobj_load_file(&mod->mod_kobj, name, module_base,
>> -                   autoload);
>> +               path = PNBUF_GET();
>> +               if (!autoload) {
>> +                       snprintf(path, MAXPATHLEN - 1, "%s", name);
>
>I think this is equivalent to strlcpy(), which of course would take
>MAXPATHLEN not MAXPATHLEN - 1.

I think we should grow a PNBUF_SIZE() macro.

christos



Home | Main Index | Thread Index | Old Index