Code review comment for lp:~vorlon/upstart/lp.980917

Revision history for this message
Steve Langasek (vorlon) wrote :

> The patch seems to have a stray 'needs_devtmpfs' at line 304:

Sorry, it's not stray, just non-idiomatic. The intent was to avoid additional filesystem checks in the case where we already know the answer. It should probably have been written:

               if (stat ("/dev/ptmx", &statbuf) < 0 || !S_ISCHR(statbuf.st_mode)
                   || major(statbuf.st_dev) != 5 || minor(statbuf.st_dev) != 2
                   || stat("/dev/pts", &statbuf) < 0 || !S_ISDIR(statbuf.st_mode))
                       needs_devtmpfs = 1;

> Also, I noticed (gcc didn't ;-) that the mknod parameters have been inadvertently
> transposed. To be safe we should also specify the permissions for the device nodes
> we're creating (and possibly explicitly set umask).

Right - I've pushed an update to the branch for these three issues.

« Back to merge proposal