summaryrefslogtreecommitdiffstats
path: root/upstream/mageia-cauldron/man3/sd_hwdb_get.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:52:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:52:03 +0000
commit932e4432596447eb9331cc2a2bb74a26a35b4efc (patch)
tree95161711ea07fd64f0c82d6e7943024c033dd5a8 /upstream/mageia-cauldron/man3/sd_hwdb_get.3
parentAdding debian version 4.22.0-1. (diff)
downloadmanpages-l10n-932e4432596447eb9331cc2a2bb74a26a35b4efc.tar.xz
manpages-l10n-932e4432596447eb9331cc2a2bb74a26a35b4efc.zip
Merging upstream version 4.23.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/mageia-cauldron/man3/sd_hwdb_get.3')
-rw-r--r--upstream/mageia-cauldron/man3/sd_hwdb_get.36
1 files changed, 3 insertions, 3 deletions
diff --git a/upstream/mageia-cauldron/man3/sd_hwdb_get.3 b/upstream/mageia-cauldron/man3/sd_hwdb_get.3
index 2a6d51ee..5444f6bd 100644
--- a/upstream/mageia-cauldron/man3/sd_hwdb_get.3
+++ b/upstream/mageia-cauldron/man3/sd_hwdb_get.3
@@ -142,16 +142,16 @@ from an early phase of the program when no other threads have been started\&.
#include <stdio\&.h>
#include <stdint\&.h>
-#include <sd\-hwdb\&.h>
+#include <systemd/sd\-hwdb\&.h>
int print_usb_properties(uint16_t vid, uint16_t pid) {
- char match[STRLEN("usb:vp") + DECIMAL_STR_MAX(uint16_t) * 2];
+ char match[128];
sd_hwdb *hwdb;
const char *key, *value;
int r;
/* Match this USB vendor and product ID combination */
- xsprintf(match, "usb:v%04Xp%04X", vid, pid);
+ snprintf(match, sizeof match, "usb:v%04Xp%04X", vid, pid);
r = sd_hwdb_new(&hwdb);
if (r < 0)