summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys-utils/ctrlaltdel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys-utils/ctrlaltdel.c b/sys-utils/ctrlaltdel.c
index 22814587f..ea662c486 100644
--- a/sys-utils/ctrlaltdel.c
+++ b/sys-utils/ctrlaltdel.c
@@ -38,7 +38,10 @@ static void __attribute__((__noreturn__)) usage(void)
static int get_cad(void)
{
- uint64_t val = path_read_u64(_PATH_PROC_CTRL_ALT_DEL);
+ uint64_t val;
+
+ if (ul_path_read_u64(NULL, &val, _PATH_PROC_CTRL_ALT_DEL) != 0)
+ err(EXIT_FAILURE, _("cannot read %s"), _PATH_PROC_CTRL_ALT_DEL);
switch (val) {
case 0: