tech-kern archive

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

Re: Enhance ptyfs to handle multiple instances.



On Mar 19, 2014, at 1:17 PM, Ilya Zykov <netbsd%izyk.ru@localhost> wrote:

>> |    *--bp = '\0';
>> | -  error = getcwd_common(cwdi->cwdi_rdir, rootvnode, &bp,
>> | +  error = getcwd_common(mp->mnt_vnodecovered, cwdi->cwdi_rdir, &bp,
>> |        buf, MAXBUF / 2, 0, l);
>> 
>> Might as well pass NULL for cwdi->cwdi_rdir, since it does the same.
>> 
> 
> But it is less obvious, and haven't advantage.
> 
>> |  
>> | -#if 0
>> | +#if 1
>> |    /* Don't allow more than one mount */
>> |    if (ptyfs_count)
>> |            return EBUSY;
>> 
>> People did not like that.
> 
> Didn't like what "if 1" or "return EBUSY”?

Speaking only for myself, “#if 1” is a very confusing way to say what a null 
string expresses much more clearly.

        paul


Home | Main Index | Thread Index | Old Index