From: munkyu.im Date: Tue, 3 Apr 2012 16:10:27 +0000 (+0900) Subject: [Title]fix process listing and qemu-img convert X-Git-Tag: 2.2.1_release^2~151^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4553be347dc6d2ae775caacdd4a3c376a58e3822;p=sdk%2Femulator%2Femulator-manager.git [Title]fix process listing and qemu-img convert [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- diff --git a/src/org/tizen/emulator/manager/ui/MainDialog.java b/src/org/tizen/emulator/manager/ui/MainDialog.java index a6eb391..6a23c3e 100644 --- a/src/org/tizen/emulator/manager/ui/MainDialog.java +++ b/src/org/tizen/emulator/manager/ui/MainDialog.java @@ -424,7 +424,7 @@ public class MainDialog { public void createBaseImage() { MessageBox msg = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL); msg.setText("Warning"); - msg.setMessage("This task can take about 30 ~ 60 seconds.\nAre you sure to continue?"); + msg.setMessage("This process may take about 30 to 60 seconds.\nAre you sure you want to continue?"); int response = msg.open(); if (response != SWT.OK) { diff --git a/src/org/tizen/emulator/manager/vms/VMsWorker.java b/src/org/tizen/emulator/manager/vms/VMsWorker.java index 807e9bc..2369520 100644 --- a/src/org/tizen/emulator/manager/vms/VMsWorker.java +++ b/src/org/tizen/emulator/manager/vms/VMsWorker.java @@ -70,15 +70,11 @@ public class VMsWorker { public void createNewBaseImage(VMsProperty property, String dest) throws VMsWorkerException { String childImage = property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue(); - String baseImage = property.getConfiguration().getBaseInformation().getDiskImage().getBaseDiskImage().getValue(); File src1 = new File(childImage); if(!src1.exists()) { throw new VMsWorkerException("Failed to create base image!\nFile does not exist :" + childImage); } - File src2 = new File(baseImage); - if(!src2.exists()) { - throw new VMsWorkerException("Failed to create base image!\nFile does not exist :" + baseImage); - } + String exe_path = FileIO.getInstance().getBinPath() + File.separator + "qemu-img"; List cmd = new ArrayList(); cmd.add(exe_path); @@ -86,7 +82,6 @@ public class VMsWorker { cmd.add("-O"); cmd.add("qcow2"); cmd.add(childImage); - cmd.add(baseImage); cmd.add(dest); EmulatorManager.getLogger().log(Level.INFO, String.format("%s", cmd)); ProcessBuilder pb = new ProcessBuilder(cmd); @@ -94,8 +89,7 @@ public class VMsWorker { pb.start(); } catch (IOException e) { throw new VMsWorkerException("Failed to create new base image!\n" + e.getMessage()); - } - + } } public void deleteVM() throws VMsWorkerException { @@ -155,7 +149,7 @@ public class VMsWorker { List cmd = new ArrayList(); if(isLinux > -1) { cmd.add("/bin/ps"); - cmd.add("-au"); + cmd.add("-ef"); } else if(isWindows > -1) { cmd.add("tasklist");