[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/4] qga: report serial ID and device node
From: |
Tomáš Golembiovský |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/4] qga: report serial ID and device node |
Date: |
Thu, 9 Aug 2018 13:50:03 +0200 |
On Tue, 7 Aug 2018 08:52:37 -0500
Eric Blake <address@hidden> 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ý <address@hidden>
> > ---
>
> > +++ 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ý <address@hidden>