diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2000-09-01 18:41:32 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2000-09-01 18:41:32 +0000 |
| commit | 84a563762067d9b4f4bfa534c936519173acdd89 (patch) | |
| tree | 36017a8ba0c069cb12e7fb3e0b17ae3c42749486 | |
| parent | c0ea0959b8cb99adf7eacd91954bd826a5be7890 (diff) | |
Notes
| -rw-r--r-- | sys/fs/procfs/procfs_vnops.c | 7 | ||||
| -rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index 0619a6893ad15..e952318335605 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -239,11 +239,8 @@ procfs_ioctl(ap) return ENOTTY; } - if ((error = p_can(p, procp, P_CAN_DEBUG, NULL))) { - if (error == ESRCH) - error = ENOENT; - return (error); - } + if ((error = p_can(p, procp, P_CAN_DEBUG, NULL))) + return (error == ESRCH ? ENOENT : error); switch (ap->a_command) { case PIOCBIS: diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 0619a6893ad15..e952318335605 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -239,11 +239,8 @@ procfs_ioctl(ap) return ENOTTY; } - if ((error = p_can(p, procp, P_CAN_DEBUG, NULL))) { - if (error == ESRCH) - error = ENOENT; - return (error); - } + if ((error = p_can(p, procp, P_CAN_DEBUG, NULL))) + return (error == ESRCH ? ENOENT : error); switch (ap->a_command) { case PIOCBIS: |
