Fixed a number of cases where a bits in an integer were tested
incorrectly, resulting in real (and nasty) bugs.
This commit is contained in:
parent
975efeac31
commit
f3c98fdca2
|
@ -37,7 +37,7 @@ PUBLIC void rproc_dmp()
|
|||
for (i=prev_i; i<NR_SYS_PROCS; i++) {
|
||||
rp = &rproc[i];
|
||||
rpub = &rprocpub[i];
|
||||
if (! rp->r_flags & RS_IN_USE) continue;
|
||||
if (! (rp->r_flags & RS_IN_USE)) continue;
|
||||
if (++n > 22) break;
|
||||
printf("%13s %9d %5d %5s %3d/%1d %3u %8u %5dx %s",
|
||||
rpub->label, rpub->endpoint, rp->r_pid,
|
||||
|
|
|
@ -26,7 +26,7 @@ PUBLIC int fs_newnode()
|
|||
/* Try to allocate the inode */
|
||||
if( (rip = alloc_inode(dev, bits) ) == NIL_INODE) return(err_code);
|
||||
|
||||
if (bits & S_IFMT != S_IFIFO) {
|
||||
if ((bits & S_IFMT) != S_IFIFO) {
|
||||
r = EIO; /* We only support pipes */
|
||||
} else if ((get_block(dev, rip->i_num)) == NIL_BUF)
|
||||
r = EIO;
|
||||
|
|
|
@ -94,7 +94,7 @@ PUBLIC int do_unlink()
|
|||
|
||||
/* Also, if the sticky bit is set, only the owner of the file or a privileged
|
||||
user is allowed to unlink */
|
||||
if (vldirp->v_mode & S_ISVTX == S_ISVTX) {
|
||||
if ((vldirp->v_mode & S_ISVTX) == S_ISVTX) {
|
||||
/* Look up inode of file to unlink to retrieve owner */
|
||||
vp = advance(vldirp, PATH_RET_SYMLINK);
|
||||
if (vp != NIL_VNODE) {
|
||||
|
@ -136,7 +136,7 @@ PUBLIC int do_rename()
|
|||
|
||||
/* If the sticky bit is set, only the owner of the file or a privileged
|
||||
user is allowed to rename */
|
||||
if(old_dirp->v_mode & S_ISVTX == S_ISVTX) {
|
||||
if((old_dirp->v_mode & S_ISVTX) == S_ISVTX) {
|
||||
/* Look up inode of file to unlink to retrieve owner */
|
||||
vp = advance(old_dirp, PATH_RET_SYMLINK);
|
||||
if (vp != NIL_VNODE) {
|
||||
|
|
Loading…
Reference in a new issue