Skip to content

Commit

Permalink
Make the recap optional
Browse files Browse the repository at this point in the history
Useful when you have to do multiple passes
  • Loading branch information
NiLuJe committed May 12, 2024
1 parent 2775e6f commit cbaf922
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions fbink.h
Original file line number Diff line number Diff line change
Expand Up @@ -1693,6 +1693,7 @@ typedef enum
OPEN_BLOCKING = 1U << 1U, // Do *NOT* open fd's with O_NONBLOCK
MATCH_ALL = 1U << 2U, // Match on *all* the match_types bits instead of *any*
EXCLUDE_ALL = 1U << 3U, // Exclude on *all* the exclude_types bits instead of *any*
NO_RECAP = 1U << 4U, // Do *NOT* print a recap of the results of input device classification
} __attribute__((packed)) INPUT_SETTINGS_TYPE_E;
typedef uint32_t INPUT_SETTINGS_TYPE_T;

Expand Down
10 changes: 6 additions & 4 deletions fbink_input_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,12 @@ static void
// Let udev's builtin input_id logic do its thing!
check_device_cap(dev);

// Recap the device's capabilities
char recap[4096] = { 0 };
concat_type_recap(dev->type, recap, sizeof(recap));
ELOG("%s: `%s`%s", dev->path, dev->name, recap);
// Recap the device's capabilities, unless requested otherwise.
if (!(settings & NO_RECAP)) {
char recap[4096] = { 0 };
concat_type_recap(dev->type, recap, sizeof(recap));
ELOG("%s: `%s`%s", dev->path, dev->name, recap);
}

// Do we want to match on *all* or *any* of the match bits?
if (settings & MATCH_ALL) {
Expand Down

0 comments on commit cbaf922

Please sign in to comment.