diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-02-27 12:38:13 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-02-27 12:38:13 +0000 |
commit | 7ad518a56c8ba7ffc93f598f7242a60643c88d2a (patch) | |
tree | 140fe453f6a8813ffa784e342a5fd0f4d0d056d8 /usr.sbin/btrace | |
parent | b6facfc99a2c5258f20a34f2f2bbdf637e9d114b (diff) |
Make it possible to check for existing string in maps.
Diffstat (limited to 'usr.sbin/btrace')
-rw-r--r-- | usr.sbin/btrace/btrace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/btrace/btrace.c b/usr.sbin/btrace/btrace.c index 4450e98b83a..ce32989be91 100644 --- a/usr.sbin/btrace/btrace.c +++ b/usr.sbin/btrace/btrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: btrace.c,v 1.88 2024/02/24 19:42:54 mpi Exp $ */ +/* $OpenBSD: btrace.c,v 1.89 2024/02/27 12:38:12 mpi Exp $ */ /* * Copyright (c) 2019 - 2023 Martin Pieuchot <mpi@openbsd.org> @@ -1640,6 +1640,9 @@ ba2long(struct bt_arg *ba, struct dt_evt *dtev) long val; switch (ba->ba_type) { + case B_AT_STR: + val = (*ba2str(ba, dtev) == '\0') ? 0 : 1; + break; case B_AT_LONG: val = (long)ba->ba_value; break; |