summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/Makefile.am8
-rw-r--r--examples/df.c29
2 files changed, 2 insertions, 35 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
index cafb7f99..d2187cbb 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,13 +1,9 @@
# libguestfs examples
-noinst_PROGRAMS = df hello
-
-df_SOURCES = df.c
-df_CFLAGS = -I$(top_builddir)/src -Wall
-df_LDADD = $(top_builddir)/src/libguestfs.la
+noinst_PROGRAMS = hello
hello_SOURCES = hello.c
hello_CFLAGS = -I$(top_builddir)/src -Wall
hello_LDADD = $(top_builddir)/src/libguestfs.la
-CLEANFILES = *~
+CLEANFILES = *~ $(noinst_PROGRAMS)
diff --git a/examples/df.c b/examples/df.c
deleted file mode 100644
index 4951a1b4..00000000
--- a/examples/df.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* A simple "df" command for guests. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <guestfs.h>
-
-int
-main (int argc, char *argv[])
-{
- guestfs_h *g;
-
- if (argc != 2 || access (argv[1], F_OK) != 0) {
- fprintf (stderr, "Usage: df disk-image\n");
- exit (1);
- }
-
- if (!(g = guestfs_create ())) exit (1);
-
- if (guestfs_add_drive (g, argv[1]) == -1) exit (1);
-
- if (guestfs_launch (g) == -1) exit (1);
- if (guestfs_wait_ready (g) == -1) exit (1);
-
-
-
- guestfs_close (g);
- return 0;
-}