WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Restore command line parsing code from qemu-0.6.1

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Restore command line parsing code from qemu-0.6.1
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Jul 2005 17:04:14 -0400
Delivery-date: Mon, 25 Jul 2005 21:04:59 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 82af26d5d134525e44b225930a45fcd8b7ec2d53
# Parent  7ac99b43f87920144cbe268016c7e346dedd99fb

Restore command line parsing code from qemu-0.6.1

This enables cdrom ejection (both file based and physical i.e. /dev/cdrom)

Signed-off-by: Edwin Zhai <edwin.zhai@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

diff -r 7ac99b43f879 -r 82af26d5d134 tools/ioemu/monitor.c
--- a/tools/ioemu/monitor.c     Mon Jul 25 21:02:34 2005
+++ b/tools/ioemu/monitor.c     Mon Jul 25 21:02:50 2005
@@ -514,21 +514,45 @@
                 str_allocated[nb_args] = str;
             add_str:
                 if (nb_args >= MAX_ARGS) {
-#if 0
                 error_args:
-#endif
                     term_printf("%s: too many arguments\n", cmdname);
                     goto fail;
                 }
                 args[nb_args++] = str;
             }
             break;
+        case '-':
+            {
+                int has_option;
+                /* option */
+                
+                c = *typestr++;
+                if (c == '\0')
+                    goto bad_type;
+                while (isspace(*p)) 
+                    p++;
+                has_option = 0;
+                if (*p == '-') {
+                    p++;
+                    if (*p != c) {
+                        term_printf("%s: unsupported option -%c\n", 
+                                    cmdname, *p);
+                        goto fail;
+                    }
+                    p++;
+                    has_option = 1;
+                }
+                if (nb_args >= MAX_ARGS)
+                    goto error_args;
+                args[nb_args++] = (void *)has_option;
+            }
+            break;
         /* TODO: add more commands we need here to support vmx device model */
         case '/':
         case 'i':
-        case '-':
         default:
-            term_printf("%s: unknown type '%c', we only support quit command 
now.\n", cmdname, c);
+        bad_type:
+            term_printf("%s: unknown type '%c',not support now.\n", cmdname, 
c);
             goto fail;
         }
     }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Restore command line parsing code from qemu-0.6.1, Xen patchbot -unstable <=