Displaying 1 result from an estimated 1 matches for "do_zero_f".
Did you mean:
do_zero_fs
2012 Feb 06
3
[PATCH 1/3] NEW API: add a new api zero_fs
..._actions.ml | 14 ++++++++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/daemon/zero.c b/daemon/zero.c
index 398f844..348869f 100644
--- a/daemon/zero.c
+++ b/daemon/zero.c
@@ -73,6 +73,23 @@ do_zero (const char *device)
}
int
+do_zero_fs (const char *device)
+{
+ int r;
+ char *err = NULL;
+
+ const char *wipefs[] = {"wipefs", "-a", device, NULL};
+ r = commandv (NULL, &err, wipefs);
+ if (r == -1) {
+ reply_with_error ("%s", err);
+ free (err);
+ return -1;
+ }
+ free (err);
+ re...