X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_usr%2Fv3_stop.c;h=a5f3249caf443239f418ad8fa7cea2d47016fae1;hb=0b342d28c860e4b3911b529f5363d35faa86aa25;hp=061cd2809fd27e5f516542490e96d66e8526df1a;hpb=401f28c04132e4f5ccafc145dcb69b6dee4afe4e;p=palacios.git diff --git a/linux_usr/v3_stop.c b/linux_usr/v3_stop.c index 061cd28..a5f3249 100644 --- a/linux_usr/v3_stop.c +++ b/linux_usr/v3_stop.c @@ -15,31 +15,25 @@ #include "v3_ctrl.h" -int read_file(int fd, int size, unsigned char * buf); - int main(int argc, char* argv[]) { int vm_fd = 0; - unsigned long vm_idx = 0; - + char * filename = argv[1]; if (argc <= 1) { - printf("Usage: ./v3_stop \n"); + printf("Usage: ./v3_stop \n"); return -1; } - - vm_idx = atoi(argv[1]); - - printf("Stopping VM\n"); + printf("Stopping VM (%s)\n", filename); - vm_fd = open("/dev/v3vee", O_RDONLY); + vm_fd = open(filename, O_RDONLY); if (vm_fd == -1) { printf("Error opening V3Vee VM device\n"); return -1; } - ioctl(vm_fd, V3_STOP_GUEST, vm_idx); + ioctl(vm_fd, V3_VM_STOP, NULL);