Eric Blake
466f902446
virsh: fix regression in argv parsing
...
Prior to commit 85d2810, we had an issue where:
snapshot-create-as dom name --diskspec spec --diskspec spec
failed to parse the second spec, because the first spec had marked
that option as no longer requiring an argument.
In commit 85d2810, I fixed it by making argv options no longer mark
the option as seen. But this in turn breaks mandatory argv options,
which now complain that the argv option is missing.
This patch reverts that part of 85d2810, and instead replaces it with
fixes to no longer clear opts_need_arg of an argv argument.
* tools/virsh.c (vshCmddefGetOption, vshCmddefGetData)
(vshCommandParse): Fix option parsing for required argv option.
(vshCmddefOptParse): Check that argv option is last.
* tests/virsh-optparse: Enhance test.
2011-09-22 13:28:18 +08:00
..
2011-07-07 17:49:21 -06:00
2011-07-29 12:12:58 +02:00
2010-12-17 11:57:11 -07:00
2010-12-01 14:12:54 +01:00
2010-11-09 15:35:43 +01:00
2011-09-05 07:03:04 -06:00
2011-09-05 07:03:04 -06:00
2010-01-19 21:13:03 +01:00
2011-07-29 17:23:55 -04:00
2011-07-25 13:50:06 +08:00
2011-07-25 13:50:06 +08:00
2009-12-14 14:58:23 +01:00
2010-03-08 09:26:04 -05:00
2011-05-23 19:41:18 -04:00
2011-05-23 19:41:18 -04:00
2011-02-17 11:07:58 -05:00
2011-09-21 16:53:06 +02:00
2011-07-28 13:46:39 -04:00
2011-07-28 13:46:39 -04:00
2010-08-19 15:58:43 -06:00
2010-08-19 15:58:43 -06:00
2009-10-16 10:52:27 -04:00
2009-10-16 10:52:27 -04:00
2011-05-26 23:32:44 +02:00
2010-12-17 11:57:11 -07:00
2011-07-28 13:46:39 -04:00
2011-07-11 09:11:15 -06:00
2011-05-26 23:32:44 +02:00
2011-07-22 15:18:32 +01:00
2011-05-03 08:03:39 -06:00
2010-01-15 16:28:05 +00:00
2011-07-21 10:34:51 -06:00
2011-08-25 12:05:54 +01:00
2011-04-30 19:59:52 +02:00
2010-05-12 08:41:10 +02:00
2011-08-19 09:13:55 -06:00
2010-11-03 11:43:11 +01:00
2011-07-11 19:38:51 +02:00
2010-07-28 16:47:56 -04:00
2010-05-20 13:50:03 -04:00
2011-07-09 10:14:38 +02:00
2011-04-29 10:21:20 -06:00
2011-04-27 15:32:30 +02:00
2011-04-29 14:26:40 -06:00
2011-07-29 17:17:21 +02:00
2010-01-15 16:28:05 +00:00
2011-04-30 19:59:52 +02:00
2011-06-30 18:04:02 +01:00
2009-10-07 12:18:13 +02:00
2009-10-07 12:18:13 +02:00
2011-09-16 15:51:31 -06:00
2010-01-15 16:28:05 +00:00
2011-06-29 01:59:34 +02:00
2011-07-25 13:50:06 +08:00
2010-01-15 16:28:05 +00:00
2011-04-30 19:59:52 +02:00
2011-07-29 12:12:58 +02:00
2010-04-06 11:09:46 -04:00
2011-04-30 19:59:52 +02:00
2011-06-24 08:01:10 -06:00
2011-05-16 10:12:21 -06:00
2011-06-01 11:58:15 +02:00
2011-06-01 11:58:15 +02:00
2011-07-22 15:18:32 +01:00
2011-09-02 21:36:58 +08:00
2011-09-21 15:17:14 -06:00
2011-09-21 16:53:06 +02:00
2011-09-02 23:39:03 +08:00
2011-04-29 10:21:20 -06:00
2010-09-14 08:42:10 -06:00
2010-05-12 08:41:10 +02:00
2011-07-09 15:47:57 +02:00
2010-04-14 17:34:12 +02:00
2011-01-10 18:10:52 +00:00
2011-07-11 09:11:15 -06:00
2011-09-16 15:51:31 -06:00
2011-09-16 15:51:31 -06:00
2011-04-29 10:21:20 -06:00
2011-06-24 11:48:18 +01:00
2010-05-12 08:41:10 +02:00
2011-07-07 17:23:09 -06:00
2010-01-15 16:28:05 +00:00
2011-04-30 19:59:52 +02:00
2010-01-15 16:28:05 +00:00
2011-04-30 19:59:52 +02:00
2010-01-15 16:28:05 +00:00
2011-07-11 09:21:37 -06:00
2011-07-21 10:34:51 -06:00
2011-06-24 11:48:14 +01:00
2011-02-15 22:51:37 +01:00
2009-07-16 15:06:42 +02:00
2009-07-27 16:45:01 +01:00
2009-07-16 15:06:42 +02:00
2011-08-19 09:22:22 -06:00
2011-07-01 16:46:20 -06:00
2010-05-12 08:41:10 +02:00
2011-05-05 13:47:40 -06:00
2011-06-29 10:47:54 +08:00
2011-08-15 15:21:31 +02:00
2011-09-08 11:03:34 +01:00
2010-05-12 08:41:10 +02:00
2011-09-22 13:28:18 +08:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2011-07-29 12:12:58 +02:00
2010-09-30 15:01:36 -06:00
2011-07-09 10:14:38 +02:00
2011-07-21 10:34:51 -06:00
2011-07-11 19:38:51 +02:00
2011-07-11 19:38:51 +02:00
2011-09-02 23:22:56 +08:00