[Title]fix process listing and qemu-img convert
authormunkyu.im <munkyu.im@samsung.com>
Tue, 3 Apr 2012 16:10:27 +0000 (01:10 +0900)
committermunkyu.im <munkyu.im@samsung.com>
Tue, 3 Apr 2012 16:10:27 +0000 (01:10 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

src/org/tizen/emulator/manager/ui/MainDialog.java
src/org/tizen/emulator/manager/vms/VMsWorker.java

index a6eb391..6a23c3e 100644 (file)
@@ -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) {
index 807e9bc..2369520 100644 (file)
@@ -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<String> cmd = new ArrayList<String>();
                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<String> cmd = new ArrayList<String>();
                        if(isLinux > -1) {
                                cmd.add("/bin/ps");
-                               cmd.add("-au");
+                               cmd.add("-ef");
                        }
                        else if(isWindows > -1) {
                                cmd.add("tasklist");