[Libguestfs] [PATCH-v3] blkid: start using libblkid directly instead

Richard W.M. Jones rjones at redhat.com
Mon Feb 27 10:40:38 UTC 2012


On Mon, Feb 27, 2012 at 05:01:04PM +0800, Wanlong Gao wrote:
> On 02/21/2012 05:20 PM, Wanlong Gao wrote:
> 
> > On 02/20/2012 04:41 PM, Richard W.M. Jones wrote:
> > 
> >> On Mon, Feb 20, 2012 at 09:40:53AM +0800, Wanlong Gao wrote:
> >>> +dnl libblkid (highly recommended)
> >>> +PKG_CHECK_MODULES([LIBBLKID], [blkid],
> >>> +        [AC_SUBST([LIBBLKID_CFLAGS])
> >>> +         AC_SUBST([LIBBLKID_LIBS])
> >>> +         AC_DEFINE([HAVE_LIBBLKID],[1],[libblkid found at compile time.])
> >>> +        ],
> >>> +        [AC_MSG_WARN([libblkid not found, some features will be disabled])])
> >>> +AM_CONDITIONAL([HAVE_LIBBLKID],[test "x$LIBBLKID_LIBS" != "x"])
> >>
> >> This makes libblkid conditional, but the code below assumes <blkid.h>
> >> and the blkid_* calls are present.
> >>
> >> I'll have to check what RHEL 5 can do ...
> > 
> > 
> > I saw that RHEL5 only has the e2fsprogs-* package but not libblkid* packages,
> > and the e2fsprogs-* for RHEL5 without the *probe* functions in libblkid,
> > so, we should use 'blkid -c /dev/null xxx' on RHEL5 for compatibility.
> > 
> > Agree?
> 
> 
> Rich:
> 
> Any ideas about this? Please help !

I've had no time to look at this at the moment.  Using libblkid
instead of blkid sounds like a good cleanup, but it's not something
that is essential and it'll cause issues with RHEL 5 (assuming we care
about RHEL 5).

Here is a useful link that we shouldn't forget ...
http://karelzak.blogspot.com/2012/02/libblkid-maintainers-brain-dump.html

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list