diff options
author | Michael Biebl <mbiebl@gmail.com> | 2010-01-23 15:01:21 -0500 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2010-01-23 15:01:21 -0500 |
commit | eb3879122867c6376c9c7e155d8919e0609f9fdf (patch) | |
tree | 2ab1ce049adb2efad39811f6c6da0b0a481aaa1f /hald | |
parent | c083adf8e79036a2e9a7218ea556f73671c08ff1 (diff) |
Check for availability of libufs on (k)freebsd
Check for availability of libufs on (k)freebsd and compile the code
conditionally.
Diffstat (limited to 'hald')
-rw-r--r-- | hald/freebsd/probing/Makefile.am | 2 | ||||
-rw-r--r-- | hald/freebsd/probing/probe-volume.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/hald/freebsd/probing/Makefile.am b/hald/freebsd/probing/Makefile.am index 3e439b5f..67b8dcf5 100644 --- a/hald/freebsd/probing/Makefile.am +++ b/hald/freebsd/probing/Makefile.am @@ -67,5 +67,5 @@ hald_probe_volume_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ @VOLUME_ID_CFLAGS@ hald_probe_volume_LDADD = \ @GLIB_LIBS@ \ @VOLUME_ID_LIBS@ \ - -lufs \ + @LIBUFS_LIBS@ \ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la diff --git a/hald/freebsd/probing/probe-volume.c b/hald/freebsd/probing/probe-volume.c index e4e16899..9c8abde4 100644 --- a/hald/freebsd/probing/probe-volume.c +++ b/hald/freebsd/probing/probe-volume.c @@ -38,10 +38,12 @@ #include <sys/param.h> #include <sys/mount.h> #include <sys/types.h> +#ifdef HAVE_LIBUFS #include <ufs/ufs/ufsmount.h> #include <ufs/ufs/dinode.h> #include <ufs/ffs/fs.h> #include <libufs.h> +#endif /* HAVE_LIBUFS */ #include <isofs/cd9660/iso.h> #include <glib.h> #include <libvolume_id.h> @@ -561,6 +563,7 @@ main (int argc, char **argv) libhal_device_set_property_bool(hfp_ctx, hfp_udi, "volume.ignore", has_children || is_swap, &hfp_error); +#ifdef HAVE_LIBUFS if (vid && ! strcmp (vid->type, "ufs")) { struct uufsd ufsdisk; @@ -602,6 +605,7 @@ main (int argc, char **argv) ufs_disk_close(&ufsdisk); } } +#endif /* HAVE_LIBUFS */ if (has_children) usage = "partitiontable"; |