aboutsummaryrefslogtreecommitdiff
path: root/console
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2021-05-26 19:19:36 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-10 22:14:02 +0200
commitccc7705774918e4ae5367c3e8931765807e3931d (patch)
tree450bc69a070741588c9bf2f84f046e54d7c6d107 /console
parenta7e36189261bc1a8dc08744cea976c88fbe4c27c (diff)
downloadhurd-ccc7705774918e4ae5367c3e8931765807e3931d.tar.gz
hurd-ccc7705774918e4ae5367c3e8931765807e3931d.tar.bz2
hurd-ccc7705774918e4ae5367c3e8931765807e3931d.zip
console: Return EOPNOTSUPP when appropriate
We do not impement most of the mach_notify_* () routines. Explicitly return an error code so that our caller knows to properly deallocate all resources the messages may carry. Even though we don't expect to receive some of the notifications from the kernel as we never sign up for them, we can always receive spoofed notifications from our clients, so don't abort in that case.
Diffstat (limited to 'console')
-rw-r--r--console/display.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/console/display.c b/console/display.c
index f137a7a4..1336371d 100644
--- a/console/display.c
+++ b/console/display.c
@@ -318,7 +318,7 @@ do_mach_notify_port_deleted (struct port_info *pi, mach_port_t name)
{
/* As we cancel the dead-name notification before deallocating the
port, this should not happen. */
- assert_backtrace (0);
+ return EOPNOTSUPP;
}
/* We request dead name notifications for the user ports. */
@@ -369,7 +369,7 @@ do_mach_notify_dead_name (struct port_info *pi, mach_port_t dead_name)
error_t
do_mach_notify_port_destroyed (struct port_info *pi, mach_port_t rights)
{
- assert_backtrace (0);
+ return EOPNOTSUPP;
}
error_t
@@ -381,7 +381,7 @@ do_mach_notify_no_senders (struct port_info *pi, mach_port_mscount_t count)
kern_return_t
do_mach_notify_send_once (struct port_info *pi)
{
- return 0;
+ return EOPNOTSUPP;
}
kern_return_t