summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-07-13 20:38:49 -0400
committermidipix <writeonce@midipix.org>2016-07-21 03:47:28 -0400
commit7307c5eee83cbc76de38ab768000dccbae2bf11e (patch)
treefbab5c0cc8bfee89b6c2d7a5d46109c46cb09435 /src/driver
parent11483c8f8afb089c39acabb2055f1a7167a9f531 (diff)
downloadptycon-7307c5eee83cbc76de38ab768000dccbae2bf11e.tar.bz2
ptycon-7307c5eee83cbc76de38ab768000dccbae2bf11e.tar.xz
driver: make --debug=raw and --debug=oven mutually exclusive.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/ptyc_driver_ctx.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/driver/ptyc_driver_ctx.c b/src/driver/ptyc_driver_ctx.c
index cf9b170..7b0b596 100644
--- a/src/driver/ptyc_driver_ctx.c
+++ b/src/driver/ptyc_driver_ctx.c
@@ -205,17 +205,21 @@ int ptyc_get_driver_ctx(
break;
case TAG_DEBUG:
- if (!entry->arg)
+ if (!entry->arg) {
cctx.drvflags |= PTYC_DRIVER_DBG_EVENT;
- else if (!strcmp("event",entry->arg))
+ } else if (!strcmp("event",entry->arg)) {
cctx.drvflags |= PTYC_DRIVER_DBG_EVENT;
- else if (!strcmp("oven",entry->arg))
+ } else if (!strcmp("oven",entry->arg)) {
+ cctx.drvflags &= ~(uint64_t)PTYC_DRIVER_DBG_RAW;
cctx.drvflags |= PTYC_DRIVER_DBG_OVEN;
- else if (!strcmp("raw",entry->arg))
+ } else if (!strcmp("raw",entry->arg)) {
+ cctx.drvflags &= ~(uint64_t)PTYC_DRIVER_DBG_OVEN;
cctx.drvflags |= PTYC_DRIVER_DBG_RAW;
+ }
+
break;
case TAG_CAT: