On Tue, 7 Aug 2018 08:52:37 -0500 Eric Blake <ebl...@redhat.com> wrote:
> On 08/07/2018 05:51 AM, Tomáš Golembiovský wrote: > > On Linux the functionality depends on libudev. > > > > Example from Linux: > > > > { > > "name": "dm-2", > > "mountpoint": "/", > > ... > > "disk": [ > > { > > "serial": "SAMSUNG_MZ7LN512HCHP-000L1_S1ZKNXAG822493", > > "dev": "/dev/sda2", > > ... > > } > > ], > > } > > > > Signed-off-by: Tomáš Golembiovský <tgole...@redhat.com> > > --- > > > +++ b/qga/commands-posix.c > > @@ -47,6 +47,7 @@ extern char **environ; > > #include <sys/socket.h> > > #include <net/if.h> > > #include <sys/statvfs.h> > > +#include <libudev.h> > > Is libudev universally available on BSD systems and always preinstalled > on Linux systems, or does this need a configure probe? The code is specific to Linux. I couldn't find portable way of querying the serial number. libudev is part of systemd, so it should generally be there. But I suppose we should not break on systems that don't use it. I'll add configure check for it. Tomas -- Tomáš Golembiovský <tgole...@redhat.com>