From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Robert Schwebel Date: Sun, 30 Oct 2011 23:00:33 +0100 Message-Id: <1320012059-24971-2-git-send-email-r.schwebel@pengutronix.de> In-Reply-To: <1320012059-24971-1-git-send-email-r.schwebel@pengutronix.de> References: <20111030220011.GK14918@pengutronix.de> <1320012059-24971-1-git-send-email-r.schwebel@pengutronix.de> Subject: [ptxdist] [PATCH 02/28] devicekit-disks: clean up patches Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Robert Schwebel Signed-off-by: Robert Schwebel --- .../0001-make-sgutils2-dependency-optional.patch | 70 +++++ .../0002-make-libparted-dependency-optional.patch | 99 +++++++ .../0003-make-devmapper-dependency-optional.patch | 65 +++++ ...0004-make-libatasmart-dependency-optional.patch | 273 ++++++++++++++++++++ .../DeviceKit-disks-009/devmapper-optional.diff | 61 ----- .../DeviceKit-disks-009/libparted-optional.diff | 95 ------- .../DeviceKit-disks-009/libsgutils-optional.diff | 66 ----- patches/DeviceKit-disks-009/series | 4 - patches/DeviceKit-disks-009/smart-optional.diff | 269 ------------------- 9 files changed, 507 insertions(+), 495 deletions(-) create mode 100644 patches/DeviceKit-disks-009/0001-make-sgutils2-dependency-optional.patch create mode 100644 patches/DeviceKit-disks-009/0002-make-libparted-dependency-optional.patch create mode 100644 patches/DeviceKit-disks-009/0003-make-devmapper-dependency-optional.patch create mode 100644 patches/DeviceKit-disks-009/0004-make-libatasmart-dependency-optional.patch delete mode 100644 patches/DeviceKit-disks-009/devmapper-optional.diff delete mode 100644 patches/DeviceKit-disks-009/libparted-optional.diff delete mode 100644 patches/DeviceKit-disks-009/libsgutils-optional.diff delete mode 100644 patches/DeviceKit-disks-009/series delete mode 100644 patches/DeviceKit-disks-009/smart-optional.diff diff --git a/patches/DeviceKit-disks-009/0001-make-sgutils2-dependency-optional.patch b/patches/DeviceKit-disks-009/0001-make-sgutils2-dependency-optional.patch new file mode 100644 index 0000000..e098137 --- /dev/null +++ b/patches/DeviceKit-disks-009/0001-make-sgutils2-dependency-optional.patch @@ -0,0 +1,70 @@ +From 8958e6ad70786ae3732c733662e3a1615c2b07f7 Mon Sep 17 00:00:00 2001 +From: Michael Olbrich +Date: Sat, 29 Oct 2011 18:38:26 +0200 +Subject: [PATCH 1/4] make sgutils2 dependency optional + +This patch adds a configure option for sgutils2. +When disabled, the helper program using it will not be built. + +Signed-off-by: Michael Olbrich +--- + configure.ac | 21 +++++++++++++-------- + src/Makefile.am | 5 ++++- + 2 files changed, 17 insertions(+), 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 48d3320..e1888bd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -109,15 +109,20 @@ if test "x$GCC" = "xyes"; then + changequote([,])dnl + fi + +-have_sgutils="false" +-AC_CHECK_LIB([sgutils2], [sg_ll_inquiry], have_sgutils="true") +-if test x$have_sgutils != "xtrue"; then +- AC_MSG_ERROR([libsgutils2 is needed]) ++AC_ARG_ENABLE(sgutils2, [ --disable-sgutils2],enable_sgutils2=$enableval,enable_sgutils2=yes) ++ ++if test "x$enable_sgutils2" = xyes; then ++ have_sgutils="false" ++ AC_CHECK_LIB([sgutils2], [sg_ll_inquiry], have_sgutils="true") ++ if test x$have_sgutils != "xtrue"; then ++ AC_MSG_ERROR([libsgutils2 is needed]) ++ fi ++ SGUTILS_CFLAGS="" ++ SGUTILS_LIBS="-lsgutils2" ++ AC_SUBST(SGUTILS_CFLAGS) ++ AC_SUBST(SGUTILS_LIBS) + fi +-SGUTILS_CFLAGS="" +-SGUTILS_LIBS="-lsgutils2" +-AC_SUBST(SGUTILS_CFLAGS) +-AC_SUBST(SGUTILS_LIBS) ++AM_CONDITIONAL(SGUTILS2_ENABLED, test "x$enable_sgutils2" = xyes) + + + PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= 001]) +diff --git a/src/Makefile.am b/src/Makefile.am +index 2d9a0c2..5eb4547 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -85,11 +85,14 @@ libexec_PROGRAMS += devkit-disks-helper-mkfs \ + devkit-disks-helper-fstab-mounter \ + devkit-disks-helper-ata-smart-collect \ + devkit-disks-helper-ata-smart-selftest \ +- devkit-disks-helper-drive-detach \ + devkit-disks-helper-drive-poll \ + devkit-disks-helper-linux-md-check \ + $(NULL) + ++if SGUTILS2_ENABLED ++libexec_PROGRAMS += devkit-disks-helper-drive-detach ++endif ++ + libexec_SCRIPTS = devkit-disks-helper-change-luks-password + + devkit_disks_helper_mkfs_SOURCES = job-shared.h job-mkfs.c +-- +1.7.7 + diff --git a/patches/DeviceKit-disks-009/0002-make-libparted-dependency-optional.patch b/patches/DeviceKit-disks-009/0002-make-libparted-dependency-optional.patch new file mode 100644 index 0000000..521adb6 --- /dev/null +++ b/patches/DeviceKit-disks-009/0002-make-libparted-dependency-optional.patch @@ -0,0 +1,99 @@ +From 841dca181b02157643d0cfe1218a240f9bc847e6 Mon Sep 17 00:00:00 2001 +From: Michael Olbrich +Date: Sat, 29 Oct 2011 18:38:26 +0200 +Subject: [PATCH 2/4] make libparted dependency optional + +This patch adds a configure option for libparted. +When disabled, the helper programs using it will not be built. + +Signed-off-by: Michael Olbrich +--- + configure.ac | 11 ++++++++--- + src/Makefile.am | 18 +++++++++++++----- + 2 files changed, 21 insertions(+), 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e1888bd..fc99275 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -153,9 +153,14 @@ PKG_CHECK_MODULES(POLKIT_BACKEND_1, [polkit-backend-1 >= 0.92]) + AC_SUBST(POLKIT_BACKEND_1_CFLAGS) + AC_SUBST(POLKIT_BACKEND_1_LIBS) + +-PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8]) +-AC_SUBST(LIBPARTED_CFLAGS) +-AC_SUBST(LIBPARTED_LIBS) ++AC_ARG_ENABLE(libparted,[ --disable-libparted],enable_libparted=$enableval,enable_libparted=yes) ++ ++if test "x$enable_libparted" = xyes; then ++ PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8]) ++ AC_SUBST(LIBPARTED_CFLAGS) ++ AC_SUBST(LIBPARTED_LIBS) ++fi ++AM_CONDITIONAL(LIBPARTED_ENABLED, test "x$enable_libparted" = xyes) + + PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02]) + AC_SUBST(DEVMAPPER_CFLAGS) +diff --git a/src/Makefile.am b/src/Makefile.am +index 5eb4547..51fa699 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -70,16 +70,14 @@ devkit_disks_daemon_LDADD = \ + $(LIBATASMART_LIBS) \ + $(NULL) + ++if LIBPARTED_ENABLED + noinst_LTLIBRARIES = libpartutil.la + libpartutil_la_SOURCES = partutil.h partutil.c + libpartutil_la_CPPFLAGS = $(LIBPARTED_CFLAGS) + libpartutil_la_LIBADD = $(LIBPARTED_LIBS) ++endif + + libexec_PROGRAMS += devkit-disks-helper-mkfs \ +- devkit-disks-helper-delete-partition \ +- devkit-disks-helper-create-partition \ +- devkit-disks-helper-modify-partition \ +- devkit-disks-helper-create-partition-table \ + devkit-disks-helper-change-filesystem-label \ + devkit-disks-helper-linux-md-remove-component \ + devkit-disks-helper-fstab-mounter \ +@@ -99,6 +97,12 @@ devkit_disks_helper_mkfs_SOURCES = job-shared.h job-mkfs.c + devkit_disks_helper_mkfs_CPPFLAGS = $(AM_CPPFLAGS) + devkit_disks_helper_mkfs_LDADD = $(GLIB_LIBS) + ++if LIBPARTED_ENABLED ++libexec_PROGRAMS += devkit-disks-helper-delete-partition \ ++ devkit-disks-helper-create-partition \ ++ devkit-disks-helper-modify-partition \ ++ devkit-disks-helper-create-partition-table \ ++ $(NULL) + devkit_disks_helper_delete_partition_SOURCES = job-shared.h job-delete-partition.c + devkit_disks_helper_delete_partition_CPPFLAGS = $(AM_CPPFLAGS) + devkit_disks_helper_delete_partition_LDADD = $(GLIB_LIBS) libpartutil.la +@@ -114,6 +118,7 @@ devkit_disks_helper_modify_partition_LDADD = $(GLIB_LIBS) libpartutil.la + devkit_disks_helper_create_partition_table_SOURCES = job-shared.h job-create-partition-table.c + devkit_disks_helper_create_partition_table_CPPFLAGS = $(AM_CPPFLAGS) + devkit_disks_helper_create_partition_table_LDADD = $(GLIB_LIBS) libpartutil.la ++endif + + devkit_disks_helper_change_filesystem_label_SOURCES = job-shared.h job-change-filesystem-label.c + devkit_disks_helper_change_filesystem_label_CPPFLAGS = $(AM_CPPFLAGS) +@@ -149,11 +154,14 @@ devkit_disks_helper_drive_poll_LDADD = $(GLIB_LIBS) + + # TODO: move to udev + udevhelperdir = $(slashlibdir)/udev +-udevhelper_PROGRAMS = devkit-disks-part-id devkit-disks-dm-export devkit-disks-probe-ata-smart ++udevhelper_PROGRAMS = devkit-disks-dm-export devkit-disks-probe-ata-smart + ++if LIBPARTED_ENABLED ++udevhelper_PROGRAMS += devkit-disks-part-id + devkit_disks_part_id_SOURCES = part-id.c + devkit_disks_part_id_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUDEV_CFLAGS) + devkit_disks_part_id_LDADD = $(GLIB_LIBS) $(LIBUDEV_LIBS) libpartutil.la ++endif + + devkit_disks_dm_export_SOURCES = devkit-disks-dm-export.c + devkit_disks_dm_export_CPPFLAGS = $(AM_CPPFLAGS) $(DEVMAPPER_CFLAGS) +-- +1.7.7 + diff --git a/patches/DeviceKit-disks-009/0003-make-devmapper-dependency-optional.patch b/patches/DeviceKit-disks-009/0003-make-devmapper-dependency-optional.patch new file mode 100644 index 0000000..80a475e --- /dev/null +++ b/patches/DeviceKit-disks-009/0003-make-devmapper-dependency-optional.patch @@ -0,0 +1,65 @@ +From 4978e00d595d043893437b6b58c48926e9ab6fdc Mon Sep 17 00:00:00 2001 +From: Michael Olbrich +Date: Sat, 29 Oct 2011 18:38:26 +0200 +Subject: [PATCH 3/4] make devmapper dependency optional + +This patch adds a configure option for devmapper. +When disabled, the helper program using it will not be built. + +Signed-off-by: Michael Olbrich +--- + configure.ac | 11 ++++++++--- + src/Makefile.am | 5 ++++- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index fc99275..751cea7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -162,9 +162,14 @@ if test "x$enable_libparted" = xyes; then + fi + AM_CONDITIONAL(LIBPARTED_ENABLED, test "x$enable_libparted" = xyes) + +-PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02]) +-AC_SUBST(DEVMAPPER_CFLAGS) +-AC_SUBST(DEVMAPPER_LIBS) ++AC_ARG_ENABLE(devmapper,[ --disable-devmapper],enable_devmapper=$enableval,enable_devmapper=yes) ++ ++if test "x$enable_devmapper" = xyes; then ++ PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02]) ++ AC_SUBST(DEVMAPPER_CFLAGS) ++ AC_SUBST(DEVMAPPER_LIBS) ++fi ++AM_CONDITIONAL(DEVMAPPER_ENABLED, test "x$enable_devmapper" = xyes) + + PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14]) + AC_SUBST(LIBATASMART_CFLAGS) +diff --git a/src/Makefile.am b/src/Makefile.am +index 51fa699..db15102 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -154,7 +154,7 @@ devkit_disks_helper_drive_poll_LDADD = $(GLIB_LIBS) + + # TODO: move to udev + udevhelperdir = $(slashlibdir)/udev +-udevhelper_PROGRAMS = devkit-disks-dm-export devkit-disks-probe-ata-smart ++udevhelper_PROGRAMS = devkit-disks-probe-ata-smart + + if LIBPARTED_ENABLED + udevhelper_PROGRAMS += devkit-disks-part-id +@@ -163,9 +163,12 @@ devkit_disks_part_id_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUDEV_CFLAGS) + devkit_disks_part_id_LDADD = $(GLIB_LIBS) $(LIBUDEV_LIBS) libpartutil.la + endif + ++if DEVMAPPER_ENABLED ++udevhelper_PROGRAMS += devkit-disks-dm-export + devkit_disks_dm_export_SOURCES = devkit-disks-dm-export.c + devkit_disks_dm_export_CPPFLAGS = $(AM_CPPFLAGS) $(DEVMAPPER_CFLAGS) + devkit_disks_dm_export_LDADD = $(DEVMAPPER_LIBS) ++endif + + devkit_disks_probe_ata_smart_SOURCES = devkit-disks-probe-ata-smart.c + devkit_disks_probe_ata_smart_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) +-- +1.7.7 + diff --git a/patches/DeviceKit-disks-009/0004-make-libatasmart-dependency-optional.patch b/patches/DeviceKit-disks-009/0004-make-libatasmart-dependency-optional.patch new file mode 100644 index 0000000..589a991 --- /dev/null +++ b/patches/DeviceKit-disks-009/0004-make-libatasmart-dependency-optional.patch @@ -0,0 +1,273 @@ +From da26752d7cd524b45e2da8ac46b03e733872c1a6 Mon Sep 17 00:00:00 2001 +From: Michael Olbrich +Date: Sat, 29 Oct 2011 18:38:26 +0200 +Subject: [PATCH 4/4] make libatasmart dependency optional + +This patch adds a configure option for libatasmart. +When disabled, the helper programs using it will not be built. +Any other code using libatasmart is guarded with appropriate ifdefs. + +Signed-off-by: Michael Olbrich +--- + configure.ac | 12 +++++++++--- + src/Makefile.am | 12 +++++++++--- + src/devkit-disks-device-private.c | 2 ++ + src/devkit-disks-device-private.h | 6 ++++++ + src/devkit-disks-device.c | 12 ++++++++++++ + tools/devkit-disks.c | 6 ++++++ + 6 files changed, 44 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 751cea7..94cf4fd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -171,9 +171,15 @@ if test "x$enable_devmapper" = xyes; then + fi + AM_CONDITIONAL(DEVMAPPER_ENABLED, test "x$enable_devmapper" = xyes) + +-PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14]) +-AC_SUBST(LIBATASMART_CFLAGS) +-AC_SUBST(LIBATASMART_LIBS) ++AC_ARG_ENABLE(libatasmart,[ --disable-libatasmart],enable_libatasmart=$enableval,enable_libatasmart=yes) ++ ++if test "x$enable_libatasmart" = xyes; then ++ PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14]) ++ AC_SUBST(LIBATASMART_CFLAGS) ++ AC_SUBST(LIBATASMART_LIBS) ++ AC_DEFINE(LIBATASMART_ENABLED,[1],[libatasmart enabled]) ++fi ++AM_CONDITIONAL(LIBATASMART_ENABLED, test "x$enable_libatasmart" = xyes) + + PKG_CHECK_MODULES(LIBUDEV, [libudev >= 142]) + AC_SUBST(LIBUDEV_CFLAGS) +diff --git a/src/Makefile.am b/src/Makefile.am +index db15102..a967dbb 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -81,8 +81,6 @@ libexec_PROGRAMS += devkit-disks-helper-mkfs \ + devkit-disks-helper-change-filesystem-label \ + devkit-disks-helper-linux-md-remove-component \ + devkit-disks-helper-fstab-mounter \ +- devkit-disks-helper-ata-smart-collect \ +- devkit-disks-helper-ata-smart-selftest \ + devkit-disks-helper-drive-poll \ + devkit-disks-helper-linux-md-check \ + $(NULL) +@@ -124,6 +122,10 @@ devkit_disks_helper_change_filesystem_label_SOURCES = job-shared.h job-change-fi + devkit_disks_helper_change_filesystem_label_CPPFLAGS = $(AM_CPPFLAGS) + devkit_disks_helper_change_filesystem_label_LDADD = $(GLIB_LIBS) + ++if LIBATASMART_ENABLED ++libexec_PROGRAMS += devkit-disks-helper-ata-smart-collect \ ++ devkit-disks-helper-ata-smart-selftest \ ++ $(NULL) + devkit_disks_helper_ata_smart_selftest_SOURCES = job-shared.h job-ata-smart-selftest.c + devkit_disks_helper_ata_smart_selftest_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) $(GLIB_CFLAGS) + devkit_disks_helper_ata_smart_selftest_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS) +@@ -131,6 +133,7 @@ devkit_disks_helper_ata_smart_selftest_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS) + devkit_disks_helper_ata_smart_collect_SOURCES = job-ata-smart-collect.c + devkit_disks_helper_ata_smart_collect_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) $(GLIB_CFLAGS) + devkit_disks_helper_ata_smart_collect_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS) ++endif + + devkit_disks_helper_linux_md_remove_component_SOURCES = job-shared.h job-linux-md-remove-component.c + devkit_disks_helper_linux_md_remove_component_CPPFLAGS = $(AM_CPPFLAGS) +@@ -154,7 +157,7 @@ devkit_disks_helper_drive_poll_LDADD = $(GLIB_LIBS) + + # TODO: move to udev + udevhelperdir = $(slashlibdir)/udev +-udevhelper_PROGRAMS = devkit-disks-probe-ata-smart ++udevhelper_PROGRAMS = + + if LIBPARTED_ENABLED + udevhelper_PROGRAMS += devkit-disks-part-id +@@ -170,9 +173,12 @@ devkit_disks_dm_export_CPPFLAGS = $(AM_CPPFLAGS) $(DEVMAPPER_CFLAGS) + devkit_disks_dm_export_LDADD = $(DEVMAPPER_LIBS) + endif + ++if LIBATASMART_ENABLED ++udevhelper_PROGRAMS += devkit-disks-probe-ata-smart + devkit_disks_probe_ata_smart_SOURCES = devkit-disks-probe-ata-smart.c + devkit_disks_probe_ata_smart_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) + devkit_disks_probe_ata_smart_LDADD = $(LIBATASMART_LIBS) ++endif + # end move to udev + + # ---------------------------------------------------------------------------------------------------- +diff --git a/src/devkit-disks-device-private.c b/src/devkit-disks-device-private.c +index c7c27c4..c61fb77 100644 +--- a/src/devkit-disks-device-private.c ++++ b/src/devkit-disks-device-private.c +@@ -1133,6 +1133,7 @@ devkit_disks_device_set_drive_ata_smart_time_collected (DevkitDisksDevice *devic + } + } + ++#ifdef LIBATASMART_ENABLED + void + devkit_disks_device_set_drive_ata_smart_status (DevkitDisksDevice *device, SkSmartOverall value) + { +@@ -1142,6 +1143,7 @@ devkit_disks_device_set_drive_ata_smart_status (DevkitDisksDevice *device, SkSma + emit_changed (device, "drive_ata_smart_status"); + } + } ++#endif + + void + devkit_disks_device_set_drive_ata_smart_blob_steal (DevkitDisksDevice *device, gchar *blob, gsize blob_size) +diff --git a/src/devkit-disks-device-private.h b/src/devkit-disks-device-private.h +index 8b8d8d2..62c7971 100644 +--- a/src/devkit-disks-device-private.h ++++ b/src/devkit-disks-device-private.h +@@ -23,7 +23,9 @@ + + #include + #include ++#ifdef LIBATASMART_ENABLED + #include ++#endif + + #include "devkit-disks-types.h" + +@@ -195,7 +197,9 @@ struct DevkitDisksDevicePrivate + + gboolean drive_ata_smart_is_available; + guint64 drive_ata_smart_time_collected; ++#ifdef LIBATASMART_ENABLED + SkSmartOverall drive_ata_smart_status; ++#endif + void *drive_ata_smart_blob; + gsize drive_ata_smart_blob_size; + +@@ -317,7 +321,9 @@ void devkit_disks_device_set_holders_objpath (DevkitDisksDevice *device, GStrv v + + void devkit_disks_device_set_drive_ata_smart_is_available (DevkitDisksDevice *device, gboolean value); + void devkit_disks_device_set_drive_ata_smart_time_collected (DevkitDisksDevice *device, guint64 value); ++#ifdef LIBATASMART_ENABLED + void devkit_disks_device_set_drive_ata_smart_status (DevkitDisksDevice *device, SkSmartOverall value); ++#endif + void devkit_disks_device_set_drive_ata_smart_blob_steal (DevkitDisksDevice *device, gchar *blob, gsize blob_size); + + +diff --git a/src/devkit-disks-device.c b/src/devkit-disks-device.c +index de9f357..69d80bf 100644 +--- a/src/devkit-disks-device.c ++++ b/src/devkit-disks-device.c +@@ -48,7 +48,9 @@ + #include + #include + #include ++#ifdef LIBATASMART_ENABLED + #include ++#endif + + #include "devkit-disks-daemon.h" + #include "devkit-disks-device.h" +@@ -539,6 +541,7 @@ get_property (GObject *object, + case PROP_DRIVE_ATA_SMART_TIME_COLLECTED: + g_value_set_uint64 (value, device->priv->drive_ata_smart_time_collected); + break; ++#ifdef LIBATASMART_ENABLED + case PROP_DRIVE_ATA_SMART_STATUS: + { + const gchar *status; +@@ -549,6 +552,7 @@ get_property (GObject *object, + g_value_set_string (value, status); + } + break; ++#endif + case PROP_DRIVE_ATA_SMART_BLOB: + { + GArray *a; +@@ -1119,7 +1123,9 @@ devkit_disks_device_init (DevkitDisksDevice *device) + device->priv->slaves_objpath = g_ptr_array_new (); + device->priv->holders_objpath = g_ptr_array_new (); + ++#ifdef LIBATASMART_ENABLED + device->priv->drive_ata_smart_status = -1; ++#endif + } + + static void +@@ -7947,6 +7953,7 @@ devkit_disks_device_filesystem_set_label (DevkitDisksDevice *device, + + /*--------------------------------------------------------------------------------------------------------------*/ + ++#ifdef LIBATASMART_ENABLED + /* may be called with context==NULL */ + static void + drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context, +@@ -8120,6 +8127,7 @@ devkit_disks_device_drive_ata_smart_refresh_data_authorized_cb (DevkitDisksDaemo + out: + ; + } ++#endif /* LIBATASMART_ENABLED */ + + /* may be called with context==NULL */ + gboolean +@@ -8127,6 +8135,7 @@ devkit_disks_device_drive_ata_smart_refresh_data (DevkitDisksDevice *device, + char **options, + DBusGMethodInvocation *context) + { ++#ifdef LIBATASMART_ENABLED + const gchar *action_id; + + if (!device->priv->drive_ata_smart_is_available) { +@@ -8153,6 +8162,9 @@ devkit_disks_device_drive_ata_smart_refresh_data (DevkitDisksDevice *device, + + out: + return TRUE; ++#else ++ return FALSE; ++#endif + } + + /*--------------------------------------------------------------------------------------------------------------*/ +diff --git a/tools/devkit-disks.c b/tools/devkit-disks.c +index 3dcc300..dcff3b0 100644 +--- a/tools/devkit-disks.c ++++ b/tools/devkit-disks.c +@@ -43,7 +43,9 @@ + #include + #include + ++#ifdef LIBATASMART_ENABLED + #include ++#endif + + #include "devkit-disks-daemon-glue.h" + #include "devkit-disks-device-glue.h" +@@ -829,6 +831,7 @@ ata_smart_status_to_desc (const gchar *status, + return desc; + } + ++#ifdef LIBATASMART_ENABLED + static gchar * + get_ata_smart_unit (guint unit, guint64 pretty_value) + { +@@ -942,6 +945,7 @@ print_ata_smart_attr (SkDisk *d, const SkSmartAttributeParsedData *a, void *user + g_free (threshold_str); + g_free (pretty); + } ++#endif + + static void + do_show_info (const char *object_path) +@@ -1116,6 +1120,7 @@ do_show_info (const char *object_path) + + /* ------------------------------------------------------------------------------------------------- */ + ++#ifdef LIBATASMART_ENABLED + if (!props->drive_ata_smart_is_available) { + g_print (" ATA SMART: not available\n"); + } else if (props->drive_ata_smart_time_collected == 0) { +@@ -1162,6 +1167,7 @@ do_show_info (const char *object_path) + + + } ++#endif + + /* ------------------------------------------------------------------------------------------------- */ + +-- +1.7.7 + diff --git a/patches/DeviceKit-disks-009/devmapper-optional.diff b/patches/DeviceKit-disks-009/devmapper-optional.diff deleted file mode 100644 index 0df9b85..0000000 --- a/patches/DeviceKit-disks-009/devmapper-optional.diff +++ /dev/null @@ -1,61 +0,0 @@ -From: Michael Olbrich -Subject: make devmapper dependency optional - -This patch adds a configure option for devmapper. -When disabled, the helper program using it will not be built. - -Signed-off-by: Michael Olbrich - ---- - configure.ac | 11 ++++++++--- - src/Makefile.am | 5 ++++- - 2 files changed, 12 insertions(+), 4 deletions(-) - -Index: b/configure.ac -=================================================================== ---- a/configure.ac -+++ b/configure.ac -@@ -160,9 +160,14 @@ if test "x$enable_libparted" = xyes; the - fi - AM_CONDITIONAL(LIBPARTED_ENABLED, test "x$enable_libparted" = xyes) - --PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02]) --AC_SUBST(DEVMAPPER_CFLAGS) --AC_SUBST(DEVMAPPER_LIBS) -+AC_ARG_ENABLE(devmapper,[ --disable-devmapper],enable_devmapper=$enableval,enable_devmapper=yes) -+ -+if test "x$enable_devmapper" = xyes; then -+ PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02]) -+ AC_SUBST(DEVMAPPER_CFLAGS) -+ AC_SUBST(DEVMAPPER_LIBS) -+fi -+AM_CONDITIONAL(DEVMAPPER_ENABLED, test "x$enable_devmapper" = xyes) - - PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14]) - AC_SUBST(LIBATASMART_CFLAGS) -Index: b/src/Makefile.am -=================================================================== ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -154,7 +154,7 @@ devkit_disks_helper_drive_poll_LDADD = - - # TODO: move to udev - udevhelperdir = $(slashlibdir)/udev --udevhelper_PROGRAMS = devkit-disks-dm-export devkit-disks-probe-ata-smart -+udevhelper_PROGRAMS = devkit-disks-probe-ata-smart - - if LIBPARTED_ENABLED - udevhelper_PROGRAMS += devkit-disks-part-id -@@ -163,9 +163,12 @@ devkit_disks_part_id_CPPFLAGS = $(AM_CPP - devkit_disks_part_id_LDADD = $(GLIB_LIBS) $(LIBUDEV_LIBS) libpartutil.la - endif - -+if DEVMAPPER_ENABLED -+udevhelper_PROGRAMS += devkit-disks-dm-export - devkit_disks_dm_export_SOURCES = devkit-disks-dm-export.c - devkit_disks_dm_export_CPPFLAGS = $(AM_CPPFLAGS) $(DEVMAPPER_CFLAGS) - devkit_disks_dm_export_LDADD = $(DEVMAPPER_LIBS) -+endif - - devkit_disks_probe_ata_smart_SOURCES = devkit-disks-probe-ata-smart.c - devkit_disks_probe_ata_smart_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) diff --git a/patches/DeviceKit-disks-009/libparted-optional.diff b/patches/DeviceKit-disks-009/libparted-optional.diff deleted file mode 100644 index 0577810..0000000 --- a/patches/DeviceKit-disks-009/libparted-optional.diff +++ /dev/null @@ -1,95 +0,0 @@ -From: Michael Olbrich -Subject: make libparted dependency optional - -This patch adds a configure option for libparted. -When disabled, the helper programs using it will not be built. - -Signed-off-by: Michael Olbrich - ---- - configure.ac | 11 ++++++++--- - src/Makefile.am | 18 +++++++++++++----- - 2 files changed, 21 insertions(+), 8 deletions(-) - -Index: b/configure.ac -=================================================================== ---- a/configure.ac -+++ b/configure.ac -@@ -151,9 +151,14 @@ PKG_CHECK_MODULES(POLKIT_BACKEND_1, [pol - AC_SUBST(POLKIT_BACKEND_1_CFLAGS) - AC_SUBST(POLKIT_BACKEND_1_LIBS) - --PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8]) --AC_SUBST(LIBPARTED_CFLAGS) --AC_SUBST(LIBPARTED_LIBS) -+AC_ARG_ENABLE(libparted,[ --disable-libparted],enable_libparted=$enableval,enable_libparted=yes) -+ -+if test "x$enable_libparted" = xyes; then -+ PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8]) -+ AC_SUBST(LIBPARTED_CFLAGS) -+ AC_SUBST(LIBPARTED_LIBS) -+fi -+AM_CONDITIONAL(LIBPARTED_ENABLED, test "x$enable_libparted" = xyes) - - PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02]) - AC_SUBST(DEVMAPPER_CFLAGS) -Index: b/src/Makefile.am -=================================================================== ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -70,16 +70,14 @@ devkit_disks_daemon_LDADD = \ - $(LIBATASMART_LIBS) \ - $(NULL) - -+if LIBPARTED_ENABLED - noinst_LTLIBRARIES = libpartutil.la - libpartutil_la_SOURCES = partutil.h partutil.c - libpartutil_la_CPPFLAGS = $(LIBPARTED_CFLAGS) - libpartutil_la_LIBADD = $(LIBPARTED_LIBS) -+endif - - libexec_PROGRAMS += devkit-disks-helper-mkfs \ -- devkit-disks-helper-delete-partition \ -- devkit-disks-helper-create-partition \ -- devkit-disks-helper-modify-partition \ -- devkit-disks-helper-create-partition-table \ - devkit-disks-helper-change-filesystem-label \ - devkit-disks-helper-linux-md-remove-component \ - devkit-disks-helper-fstab-mounter \ -@@ -99,6 +97,12 @@ devkit_disks_helper_mkfs_SOURCES = job-s - devkit_disks_helper_mkfs_CPPFLAGS = $(AM_CPPFLAGS) - devkit_disks_helper_mkfs_LDADD = $(GLIB_LIBS) - -+if LIBPARTED_ENABLED -+libexec_PROGRAMS += devkit-disks-helper-delete-partition \ -+ devkit-disks-helper-create-partition \ -+ devkit-disks-helper-modify-partition \ -+ devkit-disks-helper-create-partition-table \ -+ $(NULL) - devkit_disks_helper_delete_partition_SOURCES = job-shared.h job-delete-partition.c - devkit_disks_helper_delete_partition_CPPFLAGS = $(AM_CPPFLAGS) - devkit_disks_helper_delete_partition_LDADD = $(GLIB_LIBS) libpartutil.la -@@ -114,6 +118,7 @@ devkit_disks_helper_modify_partition_LDA - devkit_disks_helper_create_partition_table_SOURCES = job-shared.h job-create-partition-table.c - devkit_disks_helper_create_partition_table_CPPFLAGS = $(AM_CPPFLAGS) - devkit_disks_helper_create_partition_table_LDADD = $(GLIB_LIBS) libpartutil.la -+endif - - devkit_disks_helper_change_filesystem_label_SOURCES = job-shared.h job-change-filesystem-label.c - devkit_disks_helper_change_filesystem_label_CPPFLAGS = $(AM_CPPFLAGS) -@@ -149,11 +154,14 @@ devkit_disks_helper_drive_poll_LDADD = - - # TODO: move to udev - udevhelperdir = $(slashlibdir)/udev --udevhelper_PROGRAMS = devkit-disks-part-id devkit-disks-dm-export devkit-disks-probe-ata-smart -+udevhelper_PROGRAMS = devkit-disks-dm-export devkit-disks-probe-ata-smart - -+if LIBPARTED_ENABLED -+udevhelper_PROGRAMS += devkit-disks-part-id - devkit_disks_part_id_SOURCES = part-id.c - devkit_disks_part_id_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUDEV_CFLAGS) - devkit_disks_part_id_LDADD = $(GLIB_LIBS) $(LIBUDEV_LIBS) libpartutil.la -+endif - - devkit_disks_dm_export_SOURCES = devkit-disks-dm-export.c - devkit_disks_dm_export_CPPFLAGS = $(AM_CPPFLAGS) $(DEVMAPPER_CFLAGS) diff --git a/patches/DeviceKit-disks-009/libsgutils-optional.diff b/patches/DeviceKit-disks-009/libsgutils-optional.diff deleted file mode 100644 index 54a06a8..0000000 --- a/patches/DeviceKit-disks-009/libsgutils-optional.diff +++ /dev/null @@ -1,66 +0,0 @@ -From: Michael Olbrich -Subject: make sgutils2 dependency optional - -This patch adds a configure option for sgutils2. -When disabled, the helper program using it will not be built. - -Signed-off-by: Michael Olbrich - ---- - configure.ac | 21 +++++++++++++-------- - src/Makefile.am | 5 ++++- - 2 files changed, 17 insertions(+), 9 deletions(-) - -Index: b/configure.ac -=================================================================== ---- a/configure.ac -+++ b/configure.ac -@@ -109,15 +109,20 @@ if test "x$GCC" = "xyes"; then - changequote([,])dnl - fi - --have_sgutils="false" --AC_CHECK_LIB([sgutils2], [sg_ll_inquiry], have_sgutils="true") --if test x$have_sgutils != "xtrue"; then -- AC_MSG_ERROR([libsgutils2 is needed]) -+AC_ARG_ENABLE(sgutils2, [ --disable-sgutils2],enable_sgutils2=$enableval,enable_sgutils2=yes) -+ -+if test "x$enable_sgutils2" = xyes; then -+ have_sgutils="false" -+ AC_CHECK_LIB([sgutils2], [sg_ll_inquiry], have_sgutils="true") -+ if test x$have_sgutils != "xtrue"; then -+ AC_MSG_ERROR([libsgutils2 is needed]) -+ fi -+ SGUTILS_CFLAGS="" -+ SGUTILS_LIBS="-lsgutils2" -+ AC_SUBST(SGUTILS_CFLAGS) -+ AC_SUBST(SGUTILS_LIBS) - fi --SGUTILS_CFLAGS="" --SGUTILS_LIBS="-lsgutils2" --AC_SUBST(SGUTILS_CFLAGS) --AC_SUBST(SGUTILS_LIBS) -+AM_CONDITIONAL(SGUTILS2_ENABLED, test "x$enable_sgutils2" = xyes) - - - PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= 001]) -Index: b/src/Makefile.am -=================================================================== ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -85,11 +85,14 @@ libexec_PROGRAMS += devkit-disks-helper- - devkit-disks-helper-fstab-mounter \ - devkit-disks-helper-ata-smart-collect \ - devkit-disks-helper-ata-smart-selftest \ -- devkit-disks-helper-drive-detach \ - devkit-disks-helper-drive-poll \ - devkit-disks-helper-linux-md-check \ - $(NULL) - -+if SGUTILS2_ENABLED -+libexec_PROGRAMS += devkit-disks-helper-drive-detach -+endif -+ - libexec_SCRIPTS = devkit-disks-helper-change-luks-password - - devkit_disks_helper_mkfs_SOURCES = job-shared.h job-mkfs.c diff --git a/patches/DeviceKit-disks-009/series b/patches/DeviceKit-disks-009/series deleted file mode 100644 index e490966..0000000 --- a/patches/DeviceKit-disks-009/series +++ /dev/null @@ -1,4 +0,0 @@ -libsgutils-optional.diff -libparted-optional.diff -devmapper-optional.diff -smart-optional.diff diff --git a/patches/DeviceKit-disks-009/smart-optional.diff b/patches/DeviceKit-disks-009/smart-optional.diff deleted file mode 100644 index 062f7d7..0000000 --- a/patches/DeviceKit-disks-009/smart-optional.diff +++ /dev/null @@ -1,269 +0,0 @@ -From: Michael Olbrich -Subject: make libatasmart dependency optional - -This patch adds a configure option for libatasmart. -When disabled, the helper programs using it will not be built. -Any other code using libatasmart is guarded with appropriate ifdefs. - -Signed-off-by: Michael Olbrich - ---- - configure.ac | 12 +++++++++--- - src/Makefile.am | 12 +++++++++--- - src/devkit-disks-device-private.c | 2 ++ - src/devkit-disks-device-private.h | 6 ++++++ - src/devkit-disks-device.c | 12 ++++++++++++ - tools/devkit-disks.c | 6 ++++++ - 6 files changed, 44 insertions(+), 6 deletions(-) - -Index: b/configure.ac -=================================================================== ---- a/configure.ac -+++ b/configure.ac -@@ -169,9 +169,15 @@ if test "x$enable_devmapper" = xyes; the - fi - AM_CONDITIONAL(DEVMAPPER_ENABLED, test "x$enable_devmapper" = xyes) - --PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14]) --AC_SUBST(LIBATASMART_CFLAGS) --AC_SUBST(LIBATASMART_LIBS) -+AC_ARG_ENABLE(libatasmart,[ --disable-libatasmart],enable_libatasmart=$enableval,enable_libatasmart=yes) -+ -+if test "x$enable_libatasmart" = xyes; then -+ PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14]) -+ AC_SUBST(LIBATASMART_CFLAGS) -+ AC_SUBST(LIBATASMART_LIBS) -+ AC_DEFINE(LIBATASMART_ENABLED,[1],[libatasmart enabled]) -+fi -+AM_CONDITIONAL(LIBATASMART_ENABLED, test "x$enable_libatasmart" = xyes) - - PKG_CHECK_MODULES(LIBUDEV, [libudev >= 142]) - AC_SUBST(LIBUDEV_CFLAGS) -Index: b/src/Makefile.am -=================================================================== ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -81,8 +81,6 @@ libexec_PROGRAMS += devkit-disks-helper- - devkit-disks-helper-change-filesystem-label \ - devkit-disks-helper-linux-md-remove-component \ - devkit-disks-helper-fstab-mounter \ -- devkit-disks-helper-ata-smart-collect \ -- devkit-disks-helper-ata-smart-selftest \ - devkit-disks-helper-drive-poll \ - devkit-disks-helper-linux-md-check \ - $(NULL) -@@ -124,6 +122,10 @@ devkit_disks_helper_change_filesystem_la - devkit_disks_helper_change_filesystem_label_CPPFLAGS = $(AM_CPPFLAGS) - devkit_disks_helper_change_filesystem_label_LDADD = $(GLIB_LIBS) - -+if LIBATASMART_ENABLED -+libexec_PROGRAMS += devkit-disks-helper-ata-smart-collect \ -+ devkit-disks-helper-ata-smart-selftest \ -+ $(NULL) - devkit_disks_helper_ata_smart_selftest_SOURCES = job-shared.h job-ata-smart-selftest.c - devkit_disks_helper_ata_smart_selftest_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) $(GLIB_CFLAGS) - devkit_disks_helper_ata_smart_selftest_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS) -@@ -131,6 +133,7 @@ devkit_disks_helper_ata_smart_selftest_L - devkit_disks_helper_ata_smart_collect_SOURCES = job-ata-smart-collect.c - devkit_disks_helper_ata_smart_collect_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) $(GLIB_CFLAGS) - devkit_disks_helper_ata_smart_collect_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS) -+endif - - devkit_disks_helper_linux_md_remove_component_SOURCES = job-shared.h job-linux-md-remove-component.c - devkit_disks_helper_linux_md_remove_component_CPPFLAGS = $(AM_CPPFLAGS) -@@ -154,7 +157,7 @@ devkit_disks_helper_drive_poll_LDADD = - - # TODO: move to udev - udevhelperdir = $(slashlibdir)/udev --udevhelper_PROGRAMS = devkit-disks-probe-ata-smart -+udevhelper_PROGRAMS = - - if LIBPARTED_ENABLED - udevhelper_PROGRAMS += devkit-disks-part-id -@@ -170,9 +173,12 @@ devkit_disks_dm_export_CPPFLAGS = $(AM_C - devkit_disks_dm_export_LDADD = $(DEVMAPPER_LIBS) - endif - -+if LIBATASMART_ENABLED -+udevhelper_PROGRAMS += devkit-disks-probe-ata-smart - devkit_disks_probe_ata_smart_SOURCES = devkit-disks-probe-ata-smart.c - devkit_disks_probe_ata_smart_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) - devkit_disks_probe_ata_smart_LDADD = $(LIBATASMART_LIBS) -+endif - # end move to udev - - # ---------------------------------------------------------------------------------------------------- -Index: b/src/devkit-disks-device-private.h -=================================================================== ---- a/src/devkit-disks-device-private.h -+++ b/src/devkit-disks-device-private.h -@@ -23,7 +23,9 @@ - - #include - #include -+#ifdef LIBATASMART_ENABLED - #include -+#endif - - #include "devkit-disks-types.h" - -@@ -195,7 +197,9 @@ struct DevkitDisksDevicePrivate - - gboolean drive_ata_smart_is_available; - guint64 drive_ata_smart_time_collected; -+#ifdef LIBATASMART_ENABLED - SkSmartOverall drive_ata_smart_status; -+#endif - void *drive_ata_smart_blob; - gsize drive_ata_smart_blob_size; - -@@ -317,7 +321,9 @@ void devkit_disks_device_set_holders_obj - - void devkit_disks_device_set_drive_ata_smart_is_available (DevkitDisksDevice *device, gboolean value); - void devkit_disks_device_set_drive_ata_smart_time_collected (DevkitDisksDevice *device, guint64 value); -+#ifdef LIBATASMART_ENABLED - void devkit_disks_device_set_drive_ata_smart_status (DevkitDisksDevice *device, SkSmartOverall value); -+#endif - void devkit_disks_device_set_drive_ata_smart_blob_steal (DevkitDisksDevice *device, gchar *blob, gsize blob_size); - - -Index: b/src/devkit-disks-device.c -=================================================================== ---- a/src/devkit-disks-device.c -+++ b/src/devkit-disks-device.c -@@ -48,7 +48,9 @@ - #include - #include - #include -+#ifdef LIBATASMART_ENABLED - #include -+#endif - - #include "devkit-disks-daemon.h" - #include "devkit-disks-device.h" -@@ -539,6 +541,7 @@ get_property (GObject *object, - case PROP_DRIVE_ATA_SMART_TIME_COLLECTED: - g_value_set_uint64 (value, device->priv->drive_ata_smart_time_collected); - break; -+#ifdef LIBATASMART_ENABLED - case PROP_DRIVE_ATA_SMART_STATUS: - { - const gchar *status; -@@ -549,6 +552,7 @@ get_property (GObject *object, - g_value_set_string (value, status); - } - break; -+#endif - case PROP_DRIVE_ATA_SMART_BLOB: - { - GArray *a; -@@ -1119,7 +1123,9 @@ devkit_disks_device_init (DevkitDisksDev - device->priv->slaves_objpath = g_ptr_array_new (); - device->priv->holders_objpath = g_ptr_array_new (); - -+#ifdef LIBATASMART_ENABLED - device->priv->drive_ata_smart_status = -1; -+#endif - } - - static void -@@ -7947,6 +7953,7 @@ devkit_disks_device_filesystem_set_label - - /*--------------------------------------------------------------------------------------------------------------*/ - -+#ifdef LIBATASMART_ENABLED - /* may be called with context==NULL */ - static void - drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context, -@@ -8120,6 +8127,7 @@ devkit_disks_device_drive_ata_smart_refr - out: - ; - } -+#endif /* LIBATASMART_ENABLED */ - - /* may be called with context==NULL */ - gboolean -@@ -8127,6 +8135,7 @@ devkit_disks_device_drive_ata_smart_refr - char **options, - DBusGMethodInvocation *context) - { -+#ifdef LIBATASMART_ENABLED - const gchar *action_id; - - if (!device->priv->drive_ata_smart_is_available) { -@@ -8153,6 +8162,9 @@ devkit_disks_device_drive_ata_smart_refr - - out: - return TRUE; -+#else -+ return FALSE; -+#endif - } - - /*--------------------------------------------------------------------------------------------------------------*/ -Index: b/src/devkit-disks-device-private.c -=================================================================== ---- a/src/devkit-disks-device-private.c -+++ b/src/devkit-disks-device-private.c -@@ -1133,6 +1133,7 @@ devkit_disks_device_set_drive_ata_smart_ - } - } - -+#ifdef LIBATASMART_ENABLED - void - devkit_disks_device_set_drive_ata_smart_status (DevkitDisksDevice *device, SkSmartOverall value) - { -@@ -1142,6 +1143,7 @@ devkit_disks_device_set_drive_ata_smart_ - emit_changed (device, "drive_ata_smart_status"); - } - } -+#endif - - void - devkit_disks_device_set_drive_ata_smart_blob_steal (DevkitDisksDevice *device, gchar *blob, gsize blob_size) -Index: b/tools/devkit-disks.c -=================================================================== ---- a/tools/devkit-disks.c -+++ b/tools/devkit-disks.c -@@ -43,7 +43,9 @@ - #include - #include - -+#ifdef LIBATASMART_ENABLED - #include -+#endif - - #include "devkit-disks-daemon-glue.h" - #include "devkit-disks-device-glue.h" -@@ -829,6 +831,7 @@ ata_smart_status_to_desc (const gchar *s - return desc; - } - -+#ifdef LIBATASMART_ENABLED - static gchar * - get_ata_smart_unit (guint unit, guint64 pretty_value) - { -@@ -942,6 +945,7 @@ print_ata_smart_attr (SkDisk *d, const S - g_free (threshold_str); - g_free (pretty); - } -+#endif - - static void - do_show_info (const char *object_path) -@@ -1116,6 +1120,7 @@ do_show_info (const char *object_path) - - /* ------------------------------------------------------------------------------------------------- */ - -+#ifdef LIBATASMART_ENABLED - if (!props->drive_ata_smart_is_available) { - g_print (" ATA SMART: not available\n"); - } else if (props->drive_ata_smart_time_collected == 0) { -@@ -1162,6 +1167,7 @@ do_show_info (const char *object_path) - - - } -+#endif - - /* ------------------------------------------------------------------------------------------------- */ - -- 1.7.7 -- ptxdist mailing list ptxdist@pengutronix.de