diff options
Diffstat (limited to 'man/sd_device_ref.xml')
-rw-r--r-- | man/sd_device_ref.xml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/man/sd_device_ref.xml b/man/sd_device_ref.xml index c2ba6b1571..2b8512a572 100644 --- a/man/sd_device_ref.xml +++ b/man/sd_device_ref.xml @@ -62,8 +62,10 @@ int r; … r = sd_device_new_from_syspath(&device, "…"); - if (r < 0) - fprintf(stderr, "Failed to allocate device: %s\n", strerror(-r)); + if (r < 0) { + errno = -r; + fprintf(stderr, "Failed to allocate device: %m\n"); + } … }</programlisting> |