diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2009-07-15 20:32:29 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2009-07-15 20:32:29 +0000 |
commit | 5982ddc6ed98967c73889e15576dc2a8f2c2e6d2 (patch) | |
tree | 933bcc588649a83182556de891c0635403c007f7 /sbin/wsconsctl/display.c | |
parent | 2d64145026946ef281fa3700543852ff2b5a745b (diff) |
for rw query and print value that has actually been set in the
similar way that mixerctl does. so that info for setting things
like brightness makes sense (since we scale, like, 8 values to
per-cent). also, it consistifies get/put, shrinks code since we
don't need to do that in every single 'driver'. ok miod@
Diffstat (limited to 'sbin/wsconsctl/display.c')
-rw-r--r-- | sbin/wsconsctl/display.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sbin/wsconsctl/display.c b/sbin/wsconsctl/display.c index 6c0c53729d4..53e44c28a78 100644 --- a/sbin/wsconsctl/display.c +++ b/sbin/wsconsctl/display.c @@ -1,4 +1,4 @@ -/* $OpenBSD: display.c,v 1.11 2008/06/26 05:42:06 ray Exp $ */ +/* $OpenBSD: display.c,v 1.12 2009/07/15 20:32:28 martynas Exp $ */ /* $NetBSD: display.c,v 1.1 1998/12/28 14:01:16 hannken Exp $ */ /*- @@ -141,7 +141,7 @@ display_get_values(const char *pre, int fd) } } -void +int display_put_values(const char *pre, int fd) { struct wsdisplay_param param; @@ -215,10 +215,12 @@ display_put_values(const char *pre, int fd) if (errno == ENOTTY) { pf->flags |= FLG_DEAD; continue; - } else + } else { warn(cmd_str); + return 1; + } } - - pr_field(pre, pf, " -> "); } + + return 0; } |