diff options
Diffstat (limited to 'upstream/fedora-rawhide/man3/sd_hwdb_get.3')
-rw-r--r-- | upstream/fedora-rawhide/man3/sd_hwdb_get.3 | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/upstream/fedora-rawhide/man3/sd_hwdb_get.3 b/upstream/fedora-rawhide/man3/sd_hwdb_get.3 index 2a6d51ee..d198bad8 100644 --- a/upstream/fedora-rawhide/man3/sd_hwdb_get.3 +++ b/upstream/fedora-rawhide/man3/sd_hwdb_get.3 @@ -1,5 +1,5 @@ '\" t -.TH "SD_HWDB_GET" "3" "" "systemd 255" "sd_hwdb_get" +.TH "SD_HWDB_GET" "3" "" "systemd 256~rc3" "sd_hwdb_get" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -140,18 +140,19 @@ from an early phase of the program when no other threads have been started\&. .nf /* SPDX\-License\-Identifier: MIT\-0 */ +#define _GNU_SOURCE 1 #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) @@ -184,7 +185,4 @@ The effect is similar to calling were added in version 246\&. .SH "SEE ALSO" .PP -\fBsystemd\fR(1), -\fBsystemd-udevd.service\fR(8), -\fBsd-hwdb\fR(3), -\fBsystemd-hwdb\fR(8) +\fBsystemd\fR(1), \fBsystemd-udevd.service\fR(8), \fBsd-hwdb\fR(3), \fBsystemd-hwdb\fR(8) |