1 /* A simple "df" command for guests. */
9 main (int argc, char *argv[])
13 if (argc != 2 || access (argv[1], F_OK) != 0) {
14 fprintf (stderr, "Usage: df disk-image\n");
18 if (!(g = guestfs_create ())) exit (1);
20 if (guestfs_add_drive (g, argv[1]) == -1) exit (1);
22 if (guestfs_launch (g) == -1) exit (1);
23 if (guestfs_wait_ready (g) == -1) exit (1);