BuildRequires: MAKEDEV, net-tools, augeas-libs, file
BuildRequires: module-init-tools, procps, strace, iputils
BuildRequires: grub, dosfstools, ntfsprogs
+BuildRequires: zerofree
# These are only required if you want to build the bindings for
# different languages:
tar.c \
upload.c \
zero.c \
+ zerofree.c \
../src/guestfs_protocol.h \
../src/guestfs_protocol.c
extern char **do_strings (const char *path);
extern char **do_strings_e (const char *encoding, const char *path);
extern char *do_hexdump (const char *path);
+extern int do_zerofree (const char *device);
xdr_free ((xdrproc_t) xdr_guestfs_hexdump_args, (char *) &args);
}
+static void zerofree_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_zerofree_args args;
+ const char *device;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_zerofree_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "zerofree");
+ return;
+ }
+ device = args.device;
+
+ r = do_zerofree (device);
+ if (r == -1)
+ /* do_zerofree has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_zerofree_args, (char *) &args);
+}
+
void dispatch_incoming_message (XDR *xdr_in)
{
switch (proc_nr) {
case GUESTFS_PROC_HEXDUMP:
hexdump_stub (xdr_in);
break;
+ case GUESTFS_PROC_ZEROFREE:
+ zerofree_stub (xdr_in);
+ break;
default:
reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr);
}
--- /dev/null
+/* libguestfs - the guestfsd daemon
+ * Copyright (C) 2009 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "daemon.h"
+#include "actions.h"
+
+int
+do_zerofree (const char *device)
+{
+ char *err;
+ int r;
+
+ IS_DEVICE (device, -1);
+
+ r = command (NULL, &err, "/usr/sbin/zerofree", device, NULL);
+ if (r == -1) {
+ reply_with_error ("zerofree: %s: %s", device, err);
+ free (err);
+ return -1;
+ }
+
+ free (err);
+
+ return 0;
+}
printf ("%-20s %s\n", "vgs-full", "list the LVM volume groups (VGs)");
printf ("%-20s %s\n", "write-file", "create a file");
printf ("%-20s %s\n", "zero", "write zeroes to the device");
+ printf ("%-20s %s\n", "zerofree", "zero unused inodes and disk blocks on ext2/3 filesystem");
printf (" Use -h <cmd> / help <cmd> to show detailed help for a command.\n");
}
if (strcasecmp (cmd, "hexdump") == 0)
pod2text ("hexdump - dump a file in hexadecimal", " hexdump <path>\n\nThis runs C<hexdump -C> on the given C<path>. The result is\nthe human-readable, canonical hex dump of the file.\n\nBecause of the message protocol, there is a transfer limit \nof somewhere between 2MB and 4MB. To transfer large files you should use\nFTP.");
else
+ if (strcasecmp (cmd, "zerofree") == 0)
+ pod2text ("zerofree - zero unused inodes and disk blocks on ext2/3 filesystem", " zerofree <device>\n\nThis runs the I<zerofree> program on C<device>. This program\nclaims to zero unused inodes and disk blocks on an ext2/3\nfilesystem, thus making it possible to compress the filesystem\nmore effectively.\n\nYou should B<not> run this program if the filesystem is\nmounted.\n\nIt is possible that using this program can damage the filesystem\nor data on the filesystem.");
+ else
display_builtin_command (cmd);
}
return 0;
}
+static int run_zerofree (const char *cmd, int argc, char *argv[])
+{
+ int r;
+ const char *device;
+ if (argc != 1) {
+ fprintf (stderr, "%s should have 1 parameter(s)\n", cmd);
+ fprintf (stderr, "type 'help %s' for help on %s\n", cmd, cmd);
+ return -1;
+ }
+ device = argv[0];
+ r = guestfs_zerofree (g, device);
+ return r;
+}
+
int run_action (const char *cmd, int argc, char *argv[])
{
if (strcasecmp (cmd, "launch") == 0 || strcasecmp (cmd, "run") == 0)
if (strcasecmp (cmd, "hexdump") == 0)
return run_hexdump (cmd, argc, argv);
else
+ if (strcasecmp (cmd, "zerofree") == 0)
+ return run_zerofree (cmd, argc, argv);
+ else
{
fprintf (stderr, "%s: unknown command\n", cmd);
return -1;
"vgs-full",
"write-file",
"zero",
+ "zerofree",
NULL
};
to securely wipe the device). It should be sufficient to remove
any partition tables, filesystem superblocks and so on.
+=head2 zerofree
+
+ zerofree device
+
+This runs the I<zerofree> program on C<device>. This program
+claims to zero unused inodes and disk blocks on an ext2/3
+filesystem, thus making it possible to compress the filesystem
+more effectively.
+
+You should B<not> run this program if the filesystem is
+mounted.
+
+It is possible that using this program can damage the filesystem
+or data on the filesystem.
+
This function returns 0 on success or -1 on error.
+=head2 guestfs_zerofree
+
+ int guestfs_zerofree (guestfs_h *handle,
+ const char *device);
+
+This runs the I<zerofree> program on C<device>. This program
+claims to zero unused inodes and disk blocks on an ext2/3
+filesystem, thus making it possible to compress the filesystem
+more effectively.
+
+You should B<not> run this program if the filesystem is
+mounted.
+
+It is possible that using this program can damage the filesystem
+or data on the filesystem.
+
+This function returns 0 on success or -1 on error.
+
cp,
cp_a,
mv,
- ping_daemon
+ ping_daemon,
+ zerofree
) where
import Foreign
import Foreign.C
fail err
else return ()
+foreign import ccall unsafe "guestfs_zerofree" c_zerofree
+ :: GuestfsP -> CString -> IO (CInt)
+
+zerofree :: GuestfsH -> String -> IO ()
+zerofree h device = do
+ r <- withCString device $ \device -> withForeignPtr h (\p -> c_zerofree p device)
+ if (r == -1)
+ then do
+ err <- last_error h
+ fail err
+ else return ()
+
private native String _hexdump (long g, String path)
throws LibGuestFSException;
+ /**
+ * zero unused inodes and disk blocks on ext2/3 filesystem
+ *
+ * This runs the *zerofree* program on "device". This
+ * program claims to zero unused inodes and disk blocks on
+ * an ext2/3 filesystem, thus making it possible to
+ * compress the filesystem more effectively.
+ *
+ * You should not run this program if the filesystem is
+ * mounted.
+ *
+ * It is possible that using this program can damage the
+ * filesystem or data on the filesystem.
+ *
+ * @throws LibGuestFSException
+ */
+ public void zerofree (String device)
+ throws LibGuestFSException
+ {
+ if (g == 0)
+ throw new LibGuestFSException ("zerofree: handle is closed");
+ _zerofree (g, device);
+ }
+ private native void _zerofree (long g, String device)
+ throws LibGuestFSException;
+
}
return jr;
}
+JNIEXPORT void JNICALL
+Java_com_redhat_et_libguestfs_GuestFS__1zerofree
+ (JNIEnv *env, jobject obj, jlong jg, jstring jdevice)
+{
+ guestfs_h *g = (guestfs_h *) (long) jg;
+ int r;
+ const char *device;
+
+ device = (*env)->GetStringUTFChars (env, jdevice, NULL);
+ r = guestfs_zerofree (g, device);
+ (*env)->ReleaseStringUTFChars (env, jdevice, device);
+ if (r == -1) {
+ throw_exception (env, guestfs_last_error (g));
+ return ;
+ }
+}
+
-i procps
-i strace
-i util-linux-ng
+-i zerofree
"
# Decide on names for the final output. These have to match Makefile.am.
external strings : t -> string -> string array = "ocaml_guestfs_strings"
external strings_e : t -> string -> string -> string array = "ocaml_guestfs_strings_e"
external hexdump : t -> string -> string = "ocaml_guestfs_hexdump"
+external zerofree : t -> string -> unit = "ocaml_guestfs_zerofree"
val hexdump : t -> string -> string
(** dump a file in hexadecimal *)
+val zerofree : t -> string -> unit
+(** zero unused inodes and disk blocks on ext2/3 filesystem *)
+
CAMLreturn (rv);
}
+CAMLprim value
+ocaml_guestfs_zerofree (value gv, value devicev)
+{
+ CAMLparam2 (gv, devicev);
+ CAMLlocal1 (rv);
+
+ guestfs_h *g = Guestfs_val (gv);
+ if (g == NULL)
+ caml_failwith ("zerofree: used handle after closing it");
+
+ const char *device = String_val (devicev);
+ int r;
+
+ caml_enter_blocking_section ();
+ r = guestfs_zerofree (g, device);
+ caml_leave_blocking_section ();
+ if (r == -1)
+ ocaml_guestfs_raise_error (g, "zerofree");
+
+ rv = Val_unit;
+ CAMLreturn (rv);
+}
+
OUTPUT:
RETVAL
+void
+zerofree (g, device)
+ guestfs_h *g;
+ char *device;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_zerofree (g, device);
+ if (r == -1)
+ croak ("zerofree: %s", guestfs_last_error (g));
+
to securely wipe the device). It should be sufficient to remove
any partition tables, filesystem superblocks and so on.
+=item $h->zerofree ($device);
+
+This runs the I<zerofree> program on C<device>. This program
+claims to zero unused inodes and disk blocks on an ext2/3
+filesystem, thus making it possible to compress the filesystem
+more effectively.
+
+You should B<not> run this program if the filesystem is
+mounted.
+
+It is possible that using this program can damage the filesystem
+or data on the filesystem.
+
=cut
1;
return py_r;
}
+static PyObject *
+py_guestfs_zerofree (PyObject *self, PyObject *args)
+{
+ PyObject *py_g;
+ guestfs_h *g;
+ PyObject *py_r;
+ int r;
+ const char *device;
+
+ if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_zerofree",
+ &py_g, &device))
+ return NULL;
+ g = get_handle (py_g);
+
+ r = guestfs_zerofree (g, device);
+ if (r == -1) {
+ PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
+ return NULL;
+ }
+
+ Py_INCREF (Py_None);
+ py_r = Py_None;
+ return py_r;
+}
+
static PyMethodDef methods[] = {
{ (char *) "create", py_guestfs_create, METH_VARARGS, NULL },
{ (char *) "close", py_guestfs_close, METH_VARARGS, NULL },
{ (char *) "strings", py_guestfs_strings, METH_VARARGS, NULL },
{ (char *) "strings_e", py_guestfs_strings_e, METH_VARARGS, NULL },
{ (char *) "hexdump", py_guestfs_hexdump, METH_VARARGS, NULL },
+ { (char *) "zerofree", py_guestfs_zerofree, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL }
};
"""
return libguestfsmod.hexdump (self._o, path)
+ def zerofree (self, device):
+ u"""This runs the *zerofree* program on "device". This
+ program claims to zero unused inodes and disk blocks on
+ an ext2/3 filesystem, thus making it possible to
+ compress the filesystem more effectively.
+
+ You should not run this program if the filesystem is
+ mounted.
+
+ It is possible that using this program can damage the
+ filesystem or data on the filesystem.
+ """
+ return libguestfsmod.zerofree (self._o, device)
+
return rv;
}
+static VALUE ruby_guestfs_zerofree (VALUE gv, VALUE devicev)
+{
+ guestfs_h *g;
+ Data_Get_Struct (gv, guestfs_h, g);
+ if (!g)
+ rb_raise (rb_eArgError, "%s: used handle after closing it", "zerofree");
+
+ const char *device = StringValueCStr (devicev);
+ if (!device)
+ rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
+ "device", "zerofree");
+
+ int r;
+
+ r = guestfs_zerofree (g, device);
+ if (r == -1)
+ rb_raise (e_Error, "%s", guestfs_last_error (g));
+
+ return Qnil;
+}
+
/* Initialize the module. */
void Init__guestfs ()
{
ruby_guestfs_strings_e, 2);
rb_define_method (c_guestfs, "hexdump",
ruby_guestfs_hexdump, 1);
+ rb_define_method (c_guestfs, "zerofree",
+ ruby_guestfs_zerofree, 1);
}
This runs C<hexdump -C> on the given C<path>. The result is
the human-readable, canonical hex dump of the file.");
+ ("zerofree", (RErr, [String "device"]), 97, [],
+ [InitNone, Always, TestOutput (
+ [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
+ ["mkfs"; "ext3"; "/dev/sda1"];
+ ["mount"; "/dev/sda1"; "/"];
+ ["write_file"; "/new"; "test file"; "0"];
+ ["umount"; "/dev/sda1"];
+ ["zerofree"; "/dev/sda1"];
+ ["mount"; "/dev/sda1"; "/"];
+ ["cat"; "/new"]], "test file")],
+ "zero unused inodes and disk blocks on ext2/3 filesystem",
+ "\
+This runs the I<zerofree> program on C<device>. This program
+claims to zero unused inodes and disk blocks on an ext2/3
+filesystem, thus making it possible to compress the filesystem
+more effectively.
+
+You should B<not> run this program if the filesystem is
+mounted.
+
+It is possible that using this program can damage the filesystem
+or data on the filesystem.");
+
]
let all_functions = non_daemon_functions @ daemon_functions
return ctx.ret.dump; /* caller will free */
}
+struct zerofree_ctx {
+ /* This flag is set by the callbacks, so we know we've done
+ * the callbacks as expected, and in the right sequence.
+ * 0 = not called, 1 = reply_cb called.
+ */
+ int cb_sequence;
+ struct guestfs_message_header hdr;
+ struct guestfs_message_error err;
+};
+
+static void zerofree_reply_cb (guestfs_h *g, void *data, XDR *xdr)
+{
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ struct zerofree_ctx *ctx = (struct zerofree_ctx *) data;
+
+ /* This should definitely not happen. */
+ if (ctx->cb_sequence != 0) {
+ ctx->cb_sequence = 9999;
+ error (g, "%s: internal error: reply callback called twice", "guestfs_zerofree");
+ return;
+ }
+
+ ml->main_loop_quit (ml, g);
+
+ if (!xdr_guestfs_message_header (xdr, &ctx->hdr)) {
+ error (g, "%s: failed to parse reply header", "guestfs_zerofree");
+ return;
+ }
+ if (ctx->hdr.status == GUESTFS_STATUS_ERROR) {
+ if (!xdr_guestfs_message_error (xdr, &ctx->err)) {
+ error (g, "%s: failed to parse reply error", "guestfs_zerofree");
+ return;
+ }
+ goto done;
+ }
+ done:
+ ctx->cb_sequence = 1;
+}
+
+int guestfs_zerofree (guestfs_h *g,
+ const char *device)
+{
+ struct guestfs_zerofree_args args;
+ struct zerofree_ctx ctx;
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ int serial;
+
+ if (check_state (g, "guestfs_zerofree") == -1) return -1;
+ guestfs_set_busy (g);
+
+ memset (&ctx, 0, sizeof ctx);
+
+ args.device = (char *) device;
+ serial = guestfs__send_sync (g, GUESTFS_PROC_ZEROFREE,
+ (xdrproc_t) xdr_guestfs_zerofree_args, (char *) &args);
+ if (serial == -1) {
+ guestfs_end_busy (g);
+ return -1;
+ }
+
+ guestfs__switch_to_receiving (g);
+ ctx.cb_sequence = 0;
+ guestfs_set_reply_callback (g, zerofree_reply_cb, &ctx);
+ (void) ml->main_loop_run (ml, g);
+ guestfs_set_reply_callback (g, NULL, NULL);
+ if (ctx.cb_sequence != 1) {
+ error (g, "%s reply failed, see earlier error messages", "guestfs_zerofree");
+ guestfs_end_busy (g);
+ return -1;
+ }
+
+ if (check_reply_header (g, &ctx.hdr, GUESTFS_PROC_ZEROFREE, serial) == -1) {
+ guestfs_end_busy (g);
+ return -1;
+ }
+
+ if (ctx.hdr.status == GUESTFS_STATUS_ERROR) {
+ error (g, "%s", ctx.err.error_message);
+ free (ctx.err.error_message);
+ guestfs_end_busy (g);
+ return -1;
+ }
+
+ guestfs_end_busy (g);
+ return 0;
+}
+
extern char **guestfs_strings (guestfs_h *handle, const char *path);
extern char **guestfs_strings_e (guestfs_h *handle, const char *encoding, const char *path);
extern char *guestfs_hexdump (guestfs_h *handle, const char *path);
+extern int guestfs_zerofree (guestfs_h *handle, const char *device);
}
bool_t
+xdr_guestfs_zerofree_args (XDR *xdrs, guestfs_zerofree_args *objp)
+{
+ register int32_t *buf;
+
+ if (!xdr_string (xdrs, &objp->device, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_guestfs_procedure (XDR *xdrs, guestfs_procedure *objp)
{
register int32_t *buf;
};
typedef struct guestfs_hexdump_ret guestfs_hexdump_ret;
+struct guestfs_zerofree_args {
+ char *device;
+};
+typedef struct guestfs_zerofree_args guestfs_zerofree_args;
+
enum guestfs_procedure {
GUESTFS_PROC_MOUNT = 1,
GUESTFS_PROC_SYNC = 2,
GUESTFS_PROC_STRINGS = 94,
GUESTFS_PROC_STRINGS_E = 95,
GUESTFS_PROC_HEXDUMP = 96,
- GUESTFS_PROC_NR_PROCS = 96 + 1,
+ GUESTFS_PROC_ZEROFREE = 97,
+ GUESTFS_PROC_NR_PROCS = 97 + 1,
};
typedef enum guestfs_procedure guestfs_procedure;
#define GUESTFS_MESSAGE_MAX 4194304
extern bool_t xdr_guestfs_strings_e_ret (XDR *, guestfs_strings_e_ret*);
extern bool_t xdr_guestfs_hexdump_args (XDR *, guestfs_hexdump_args*);
extern bool_t xdr_guestfs_hexdump_ret (XDR *, guestfs_hexdump_ret*);
+extern bool_t xdr_guestfs_zerofree_args (XDR *, guestfs_zerofree_args*);
extern bool_t xdr_guestfs_procedure (XDR *, guestfs_procedure*);
extern bool_t xdr_guestfs_message_direction (XDR *, guestfs_message_direction*);
extern bool_t xdr_guestfs_message_status (XDR *, guestfs_message_status*);
extern bool_t xdr_guestfs_strings_e_ret ();
extern bool_t xdr_guestfs_hexdump_args ();
extern bool_t xdr_guestfs_hexdump_ret ();
+extern bool_t xdr_guestfs_zerofree_args ();
extern bool_t xdr_guestfs_procedure ();
extern bool_t xdr_guestfs_message_direction ();
extern bool_t xdr_guestfs_message_status ();
string dump<>;
};
+struct guestfs_zerofree_args {
+ string device<>;
+};
+
enum guestfs_procedure {
GUESTFS_PROC_MOUNT = 1,
GUESTFS_PROC_SYNC = 2,
GUESTFS_PROC_STRINGS = 94,
GUESTFS_PROC_STRINGS_E = 95,
GUESTFS_PROC_HEXDUMP = 96,
+ GUESTFS_PROC_ZEROFREE = 97,
GUESTFS_PROC_NR_PROCS
};
fprintf (stderr, "warning: \"guestfs_get_e2uuid\" has no tests\n");
}
+static int test_zerofree_0 (void)
+{
+ /* TestOutput for zerofree (0) */
+ char expected[] = "test file";
+ {
+ char device[] = "/dev/sda";
+ device[5] = devchar;
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char fstype[] = "ext3";
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkfs (g, fstype, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
+ char mountpoint[] = "/";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mount (g, device, mountpoint);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char path[] = "/new";
+ char content[] = "test file";
+ int r;
+ suppress_error = 0;
+ r = guestfs_write_file (g, path, content, 0);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char pathordevice[] = "/dev/sda1";
+ pathordevice[5] = devchar;
+ int r;
+ suppress_error = 0;
+ r = guestfs_umount (g, pathordevice);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
+ int r;
+ suppress_error = 0;
+ r = guestfs_zerofree (g, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
+ char mountpoint[] = "/";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mount (g, device, mountpoint);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char path[] = "/new";
+ char *r;
+ suppress_error = 0;
+ r = guestfs_cat (g, path);
+ if (r == NULL)
+ return -1;
+ if (strcmp (r, expected) != 0) {
+ fprintf (stderr, "test_zerofree_0: expected \"%s\" but got \"%s\"\n", expected, r);
+ return -1;
+ }
+ free (r);
+ }
+ return 0;
+}
+
static int test_hexdump_0 (void)
{
/* InitBasicFS for hexdump (0): create ext2 on /dev/sda1 */
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_0");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_0");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_1");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_1");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_2");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_2");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_3");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_3");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_4");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_4");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_5");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_5");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_6");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_6");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_7");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_7");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_8");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_8");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_9");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_9");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_lines_10");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_lines_10");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_0");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_0");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_1");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_1");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_2");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_2");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_3");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_3");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_4");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_4");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_5");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_5");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_6");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_6");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_7");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_7");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_8");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_8");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_9");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_9");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_10");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_10");
return 0;
}
free (r);
}
} else
- printf ("%s skippedd (reason: test prerequisite)\n", "test_command_11");
+ printf ("%s skipped (reason: test prerequisite)\n", "test_command_11");
return 0;
}
free (devs[i]);
free (devs);
- nr_tests = 135;
+ nr_tests = 136;
test_num++;
+ printf ("%3d/%3d test_zerofree_0\n", test_num, nr_tests);
+ if (test_zerofree_0 () == -1) {
+ printf ("test_zerofree_0 FAILED\n");
+ failed++;
+ }
+ test_num++;
printf ("%3d/%3d test_hexdump_0\n", test_num, nr_tests);
if (test_hexdump_0 () == -1) {
printf ("test_hexdump_0 FAILED\n");