summaryrefslogtreecommitdiff
path: root/src/power_commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/power_commands.c')
-rw-r--r--src/power_commands.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/power_commands.c b/src/power_commands.c
index 145bf98..40684fd 100644
--- a/src/power_commands.c
+++ b/src/power_commands.c
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include <string.h>
#include<sd_bus.h>
@@ -100,7 +101,10 @@ const char* get_dbus_power_property_value(power_command_t cmd)
int com_power( char *arg )
{
power_command_t cmd = parse_power_command(arg);
- if(cmd==POWER_UNKNOWN) return -EOPNOTSUPP;
+ if(cmd==POWER_UNKNOWN) {
+ fprintf(stderr, "Unknown command: %s\n", arg);
+ return -EOPNOTSUPP;
+ }
const string_quadruple_t* dbus_power_interface = get_dbus_power_interface(cmd);
if(!dbus_power_interface)
return -EOPNOTSUPP;