summaryrefslogtreecommitdiffstats
path: root/daemon/zerofree.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/zerofree.c')
-rw-r--r--daemon/zerofree.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/daemon/zerofree.c b/daemon/zerofree.c
index ffb9b70b..05a547bd 100644
--- a/daemon/zerofree.c
+++ b/daemon/zerofree.c
@@ -26,6 +26,14 @@
#include "daemon.h"
#include "actions.h"
+#include "optgroups.h"
+
+int
+optgroup_zerofree_available (void)
+{
+ int r = access ("/usr/sbin/zerofree", X_OK);
+ return r == 0;
+}
int
do_zerofree (const char *device)