wip
This commit is contained in:
14
main.c
14
main.c
@@ -30,5 +30,19 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
free(filesystems);
|
free(filesystems);
|
||||||
|
|
||||||
|
guestfs_mount(g, "/dev/sda3", "/");
|
||||||
|
|
||||||
|
char *passwd = guestfs_cat(g, "/etc/passwd");
|
||||||
|
|
||||||
|
printf("passwd contents:\n\n%s", passwd);
|
||||||
|
|
||||||
|
free(passwd);
|
||||||
|
|
||||||
|
/* Unmount everything. */
|
||||||
|
if (guestfs_umount_all(g) == -1)
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
|
guestfs_shutdown(g);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user