[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: support custom block hotplug scripts
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1344252483 -3600 # Node ID 353bc0801b11ee28855cad50ffc7b8afe0efa556 # Parent 60f2c7b74741776d1a25fe2618fb17b570996ce5 libxl: support custom block hotplug scripts These are provided using the "script=" syntax described in docs/misc/xl-disk-configuration.txt. The existing hotplug scripts currently conflate two different concepts, namely that of making a datapath available in the backend domain (logging into iSCSI LUNs and the like) and that of actually connecting that datapath to a Xen backend path (e.g. writing "physical-device" node in xenstore to bring up blkback). For this reason the script support implemented here is only supported in conjunction with backendtype=phy. Eventually we hope to rework the hotplug scripts to separate the to concepts, but that is not 4.2 material. In addition there are some other subtleties: - Previously in the blktap case we would add "script = .../blktap" to the backend flex array, but then jumped to the PHY case which added "script = .../block" too. The block one takes precendence since it comes second. This was, accidentally, correct. The blktap script is for blktap1 devices and not blktap2 devices. libxl completely manages the blktap2 side of things without resorting to hotplug scripts and creates a blkback device directly. Therefore the "block" script is always the correct one to call. Custom script are not supported in this context. - libxl should not write the "physical-device" node. This is the responsibility of the block script. Writing the "physical-device" node in libxl basically completely short-cuts the standard block hotplug script which uses "physical-device" to know if it has run already or not. In the case of more complex scripts libxl cannot know the right value to write here anyway, in particular the device may not exist until after the script is called. This change has the side effect of re-enabling the checks for device sharing aspect of the default block script, which I have tested and which now cause libxl to properly abort now that libxl properly checks for hotplug script errors. There is no sharing check for blktap2 since even if you reuse the same vhd the resulting tap device is different. I would have preferred to simply write the "physical-device" node for the blktap2 case but the hotplug script infrastructure is not currently setup to handle LIBXL__DEVICE_KIND_VBD devices without a hotplug script (backendtype phy and tap both end up as KIND_VBD). Changing this was more surgery than I was happy doing for 4.2 and therefore I have simply hardcoded to the block script for the LIBXL_DISK_BACKEND_TAP case. - libxl__device_disk_set_backend running against a phy device with a script cannot stat the device to check its properties since it may not exist until the script is run. Therefore I have special cased this in disk_try_backend to simply assume that backend == phy is always ok if a script was configured. Similarly the other backend types are always rejected if a script was configured. Note that the reason for implementing the default script behaviour in device_disk_add instead of libxl__device_disk_setdefault is because we need to be able to tell when the script was user-supplied rather than defaulted by libxl in order to correctly implement the above. The setdefault function must be idempotent so we cannot simply update disk->script. I suspect that for 4.3 a script member should be added to libxl__device, this would also help in the case above of handling devices with no script in a consistent manner. This is not 4.2 material. - When the block script falls through and shells out to a block-$type script it used to pass "$node" however the only place this was assigned was in the remove+phy case (in which case it contains the file:// derived /dev/loopN device), and in that case the script exits without falling through to the block-$type case. Since libxl never creates a type other than phy this never happens in practice anyway and we now call the correct block-$type script directly. But fix it up anyway since it is confusing. - The block-nbd and block-enbd scripts which we supply appear to be broken WRT the hotplug calling convention, in that they seem to expect a command line parameter (perhaps the $node described above) rather than reading the appropriate node from xenstore. I rather suspect this was broken by 7774:e2e7f47e6f79 in November 2005. I think it is safe to say no one is using these scripts! I haven't fixed this here. It would be good to track down some working scripts and either incorproate them or defer to them in their existing home (e.g. if they live somewhere useful like the nbd tools package). - Added a few block script related entries to check-xl-disk-parse from http://backdrift.org/xen-block-iscsi-script-with-multipath-support and http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html / http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html (and snuck in another interesting empty CDROM case) This highlighted two bugs in the libxlu disk parser handling of the deprecated "<script>:" prefix: - It was failing to prefix with "block-" to construct the actual script name - The regex for matching iscsi or drdb or e?nbd was incorrect - Use libxl__abs_path for the nic script too. Just because the existing code nearly tricked me into repeating the mistake I have tested with a custom block script which uses "lvchange -a" to dynamically add remove the referenced device (simulates iSCSI login/logout without requiring me to faff around setting up an iSCSI target). I also tested on a blktap2 system. I haven't directly tested anything more complex like iscsi: or nbd: other than what check-xl-disk-parse exercises. [ Recommit of correct version of 25727:a8d708fcb347, which was mangled during commit. Sorry. -iwj ] Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- diff -r 60f2c7b74741 -r 353bc0801b11 docs/misc/xl-disk-configuration.txt --- a/docs/misc/xl-disk-configuration.txt Mon Aug 06 12:25:06 2012 +0100 +++ b/docs/misc/xl-disk-configuration.txt Mon Aug 06 12:28:03 2012 +0100 @@ -160,7 +160,10 @@ script=<script> --------------- Specifies that <target> is not a normal host path, but rather -information to be interpreted by /etc/xen/scripts/block-<script>. +information to be interpreted by the executable program <script>, +(looked for in /etc/xen/scripts, if it doesn't contain a slash). + +These scripts are normally called "block-<script>". @@ -204,7 +207,7 @@ Supported values: iscsi: nbd: enb In xend and old versions of libxl it was necessary to specify the "script" (see above) with a prefix. For compatibility, these four prefixes are recognised as specifying the corresponding script. They -are equivalent to "script=<script>". +are equivalent to "script=block-<script>". <deprecated-prefix>: diff -r 60f2c7b74741 -r 353bc0801b11 tools/hotplug/Linux/block --- a/tools/hotplug/Linux/block Mon Aug 06 12:25:06 2012 +0100 +++ b/tools/hotplug/Linux/block Mon Aug 06 12:28:03 2012 +0100 @@ -342,4 +342,4 @@ esac # If we've reached here, $t is neither phy nor file, so fire a helper script. [ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \ - ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node + ${XEN_SCRIPT_DIR}/block-"$t" "$command" diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/check-xl-disk-parse --- a/tools/libxl/check-xl-disk-parse Mon Aug 06 12:25:06 2012 +0100 +++ b/tools/libxl/check-xl-disk-parse Mon Aug 06 12:28:03 2012 +0100 @@ -142,5 +142,44 @@ disk: { EOF one 0 vdev=hdc,access=r,devtype=cdrom,format=empty +one 0 vdev=hdc,access=r,devtype=cdrom + +expected <<EOF +disk: { + "backend_domid": 0, + "pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost", + "vdev": "xvda", + "backend": "unknown", + "format": "raw", + "script": "block-iscsi", + "removable": 0, + "readwrite": 1, + "is_cdrom": 0 +} + +EOF + +# http://backdrift.org/xen-block-iscsi-script-with-multipath-support +one 0 iscsi:iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost,xvda,w +one 0 vdev=xvda,access=w,script=block-iscsi,target=iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost + +expected <<EOF +disk: { + "backend_domid": 0, + "pdev_path": "app01", + "vdev": "hda", + "backend": "unknown", + "format": "raw", + "script": "block-drbd", + "removable": 0, + "readwrite": 1, + "is_cdrom": 0 +} + +EOF + +# http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html +# http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html +one 0 drbd:app01,hda,w complete diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxl.c --- a/tools/libxl/libxl.c Mon Aug 06 12:25:06 2012 +0100 +++ b/tools/libxl/libxl.c Mon Aug 06 12:28:03 2012 +0100 @@ -1796,9 +1796,9 @@ static void device_disk_add(libxl__egc * STATE_AO_GC(aodev->ao); flexarray_t *front = NULL; flexarray_t *back = NULL; - char *dev; + char *dev, *script; libxl__device *device; - int major, minor, rc; + int rc; libxl_ctx *ctx = gc->owner; xs_transaction_t t = XBT_NULL; @@ -1833,13 +1833,6 @@ static void device_disk_add(libxl__egc * goto out_free; } - if (disk->script) { - LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts" - " not yet supported, sorry"); - rc = ERROR_INVAL; - goto out_free; - } - GCNEW(device); rc = libxl__device_from_disk(gc, domid, disk, device); if (rc != 0) { @@ -1851,18 +1844,16 @@ static void device_disk_add(libxl__egc * switch (disk->backend) { case LIBXL_DISK_BACKEND_PHY: dev = disk->pdev_path; + + script = libxl__abs_path(gc, disk->script ?: "block", + libxl__xen_script_dir_path()); + do_backend_phy: - libxl__device_physdisk_major_minor(dev, &major, &minor); - flexarray_append(back, "physical-device"); - flexarray_append(back, libxl__sprintf(gc, "%x:%x", major, minor)); - flexarray_append(back, "params"); flexarray_append(back, dev); - flexarray_append(back, "script"); - flexarray_append(back, GCSPRINTF("%s/%s", - libxl__xen_script_dir_path(), - "block")); + assert(script); + flexarray_append_pair(back, "script", script); assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD); break; @@ -1879,10 +1870,12 @@ static void device_disk_add(libxl__egc * libxl__device_disk_string_of_format(disk->format), disk->pdev_path)); - flexarray_append(back, "script"); - flexarray_append(back, GCSPRINTF("%s/%s", - libxl__xen_script_dir_path(), - "blktap")); + /* + * tap devices do not support custom block scripts and + * always use the plain block script. + */ + script = libxl__abs_path(gc, "block", + libxl__xen_script_dir_path()); /* now create a phy device to export the device to the guest */ goto do_backend_phy; @@ -2582,13 +2575,10 @@ void libxl__device_nic_add(libxl__egc *e flexarray_append(back, "1"); flexarray_append(back, "state"); flexarray_append(back, libxl__sprintf(gc, "%d", 1)); - if (nic->script) { - flexarray_append(back, "script"); - flexarray_append(back, nic->script[0]=='/' ? nic->script - : libxl__sprintf(gc, "%s/%s", - libxl__xen_script_dir_path(), - nic->script)); - } + if (nic->script) + flexarray_append_pair(back, "script", + libxl__abs_path(gc, nic->script, + libxl__xen_script_dir_path())); if (nic->ifname) { flexarray_append(back, "vifname"); diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxl_device.c --- a/tools/libxl/libxl_device.c Mon Aug 06 12:25:06 2012 +0100 +++ b/tools/libxl/libxl_device.c Mon Aug 06 12:28:03 2012 +0100 @@ -147,18 +147,26 @@ typedef struct { } disk_try_backend_args; static int disk_try_backend(disk_try_backend_args *a, - libxl_disk_backend backend) { + libxl_disk_backend backend) + { + libxl__gc *gc = a->gc; /* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or * backend on success */ - libxl_ctx *ctx = libxl__gc_owner(a->gc); + libxl_ctx *ctx = libxl__gc_owner(gc); + switch (backend) { - case LIBXL_DISK_BACKEND_PHY: if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW || a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) { goto bad_format; } + if (a->disk->script) { + LOG(DEBUG, "Disk vdev=%s, uses script=... assuming phy backend", + a->disk->vdev); + return backend; + } + if (libxl__try_phy_backend(a->stab.st_mode)) return backend; @@ -168,6 +176,8 @@ static int disk_try_backend(disk_try_bac return 0; case LIBXL_DISK_BACKEND_TAP: + if (a->disk->script) goto bad_script; + if (!libxl__blktap_enabled(a->gc)) { LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap" " unsuitable because blktap not available", @@ -181,6 +191,7 @@ static int disk_try_backend(disk_try_bac return backend; case LIBXL_DISK_BACKEND_QDISK: + if (a->disk->script) goto bad_script; return backend; default: @@ -198,6 +209,11 @@ static int disk_try_backend(disk_try_bac libxl_disk_backend_to_string(backend), libxl_disk_format_to_string(a->disk->format)); return 0; + + bad_script: + LOG(DEBUG, "Disk vdev=%s, backend %s not compatible with script=...", + a->disk->vdev, libxl_disk_backend_to_string(backend)); + return 0; } int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) { @@ -220,7 +236,7 @@ int libxl__device_disk_set_backend(libxl return ERROR_INVAL; } memset(&a.stab, 0, sizeof(a.stab)); - } else { + } else if (!disk->script) { if (stat(disk->pdev_path, &a.stab)) { LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s " "failed to stat: %s", diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_i.h --- a/tools/libxl/libxlu_disk_i.h Mon Aug 06 12:25:06 2012 +0100 +++ b/tools/libxl/libxlu_disk_i.h Mon Aug 06 12:28:03 2012 +0100 @@ -1,8 +1,6 @@ #ifndef LIBXLU_DISK_I_H #define LIBXLU_DISK_I_H -#include "libxl_osdeps.h" /* must come before any other headers */ - #include "libxlu_internal.h" diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_l.c --- a/tools/libxl/libxlu_disk_l.c Mon Aug 06 12:25:06 2012 +0100 +++ b/tools/libxl/libxlu_disk_l.c Mon Aug 06 12:28:03 2012 +0100 @@ -1,6 +1,10 @@ #line 2 "libxlu_disk_l.c" +#line 31 "libxlu_disk_l.l" +#include "libxl_osdeps.h" /* must come before any other headers */ -#line 4 "libxlu_disk_l.c" + + +#line 8 "libxlu_disk_l.c" #define YY_INT_ALIGNED short int @@ -366,7 +370,7 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_acclist[456] = +static yyconst flex_int16_t yy_acclist[447] = { 0, 24, 24, 26, 22, 23, 25, 8193, 22, 23, 25, 16385, 8193, 22, 25,16385, 22, 23, 25, 23, 25, @@ -379,77 +383,76 @@ static yyconst flex_int16_t yy_acclist[4 8213, 22,16405, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 24, 8193, 22, 8193, 22, 8193, 8213, 22, 8213, - 22, 8213, 12, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 24, 8193, 22, 8193, 22, 8193, 8213, 22, + 8213, 22, 8213, 12, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 8213, 22, 8213, 22, 8213, 12, 22, 17, 8213, 22, - 16405, 22, 22, 22, 22, 22, 22, 22, 8213, 22, - 16405, 20, 8213, 22,16405, 22, 8205, 8213, 22,16397, - 16405, 22, 22, 8208, 8213, 22,16400,16405, 22, 22, - 22, 22, 17, 8213, 22, 17, 8213, 22, 17, 22, - 17, 8213, 22, 3, 22, 22, 19, 8213, 22,16405, - 22, 22, 22, 22, 20, 8213, 22, 20, 8213, 22, + 22, 22, 8213, 22, 8213, 22, 8213, 12, 22, 17, + 8213, 22,16405, 22, 22, 22, 22, 22, 22, 22, + 8206, 8213, 22,16398,16405, 20, 8213, 22,16405, 22, + 8205, 8213, 22,16397,16405, 22, 22, 8208, 8213, 22, + 16400,16405, 22, 22, 22, 22, 17, 8213, 22, 17, + 8213, 22, 17, 22, 17, 8213, 22, 3, 22, 22, + 19, 8213, 22,16405, 22, 22, 8206, 8213, 22, 8206, - 20, 22, 20, 8213, 8205, 8213, 22, 8205, 8213, 22, - 8205, 22, 8205, 8213, 22, 8208, 8213, 22, 8208, 8213, - 22, 8208, 22, 8208, 8213, 22, 22, 9, 22, 17, - 8213, 22, 17, 8213, 22, 17, 8213, 17, 22, 17, - 22, 3, 22, 22, 19, 8213, 22, 19, 8213, 22, - 19, 22, 19, 8213, 22, 18, 8213, 22,16405, 8206, - 8213, 22,16398,16405, 22, 20, 8213, 22, 20, 8213, - 22, 20, 8213, 20, 22, 20, 8205, 8213, 22, 8205, - 8213, 22, 8205, 8213, 8205, 22, 8205, 22, 8208, 8213, - 22, 8208, 8213, 22, 8208, 8213, 8208, 22, 8208, 22, + 8213, 22, 8206, 22, 8206, 8213, 20, 8213, 22, 20, + 8213, 22, 20, 22, 20, 8213, 8205, 8213, 22, 8205, + 8213, 22, 8205, 22, 8205, 8213, 22, 8208, 8213, 22, + 8208, 8213, 22, 8208, 22, 8208, 8213, 22, 22, 9, + 22, 17, 8213, 22, 17, 8213, 22, 17, 8213, 17, + 22, 17, 22, 3, 22, 22, 19, 8213, 22, 19, + 8213, 22, 19, 22, 19, 8213, 22, 18, 8213, 22, + 16405, 8206, 8213, 22, 8206, 8213, 22, 8206, 8213, 8206, + 22, 8206, 20, 8213, 22, 20, 8213, 22, 20, 8213, + 20, 22, 20, 8205, 8213, 22, 8205, 8213, 22, 8205, - 22, 9, 12, 9, 7, 22, 22, 19, 8213, 22, - 19, 8213, 22, 19, 8213, 19, 22, 19, 2, 18, - 8213, 22, 18, 8213, 22, 18, 22, 18, 8213, 8206, - 8213, 22, 8206, 8213, 22, 8206, 22, 8206, 8213, 22, - 10, 22, 11, 9, 9, 12, 7, 12, 7, 22, - 6, 2, 12, 2, 18, 8213, 22, 18, 8213, 22, - 18, 8213, 18, 22, 18, 8206, 8213, 22, 8206, 8213, - 22, 8206, 8213, 8206, 22, 8206, 22, 10, 12, 10, - 15, 8213, 22,16405, 11, 12, 11, 7, 7, 12, - 22, 6, 12, 6, 6, 12, 6, 12, 2, 2, + 8213, 8205, 22, 8205, 22, 8208, 8213, 22, 8208, 8213, + 22, 8208, 8213, 8208, 22, 8208, 22, 22, 9, 12, + 9, 7, 22, 22, 19, 8213, 22, 19, 8213, 22, + 19, 8213, 19, 22, 19, 2, 18, 8213, 22, 18, + 8213, 22, 18, 22, 18, 8213, 10, 22, 11, 9, + 9, 12, 7, 12, 7, 22, 6, 2, 12, 2, + 18, 8213, 22, 18, 8213, 22, 18, 8213, 18, 22, + 18, 10, 12, 10, 15, 8213, 22,16405, 11, 12, + 11, 7, 7, 12, 22, 6, 12, 6, 6, 12, + 6, 12, 2, 2, 12, 10, 10, 12, 15, 8213, - 12, 8206, 22,16398, 10, 10, 12, 15, 8213, 22, - 15, 8213, 22, 15, 22, 15, 8213, 11, 12, 22, - 6, 6, 12, 6, 6, 15, 8213, 22, 15, 8213, - 22, 15, 8213, 15, 22, 15, 22, 6, 6, 8, - 6, 5, 6, 8, 12, 8, 4, 6, 5, 6, - 8, 8, 12, 4, 6 + 22, 15, 8213, 22, 15, 22, 15, 8213, 11, 12, + 22, 6, 6, 12, 6, 6, 15, 8213, 22, 15, + 8213, 22, 15, 8213, 15, 22, 15, 22, 6, 6, + 8, 6, 5, 6, 8, 12, 8, 4, 6, 5, + 6, 8, 8, 12, 4, 6 } ; -static yyconst flex_int16_t yy_accept[257] = +static yyconst flex_int16_t yy_accept[252] = { 0, 1, 1, 1, 2, 3, 4, 7, 12, 16, 19, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 68, 69, 70, 71, 73, 76, 78, 79, 80, 81, 84, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 105, 107, 108, - 110, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 97, 98, 99, 100, 101, 102, 103, 104, 106, 108, + 109, 111, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 133, 135, 136, 137, 138, 142, 143, 144, 145, - 146, 147, 148, 149, 152, 156, 157, 162, 163, 164, + 131, 132, 133, 135, 137, 138, 139, 140, 144, 145, + 146, 147, 148, 149, 150, 151, 156, 160, 161, 166, - 169, 170, 171, 172, 173, 176, 179, 181, 183, 184, - 186, 187, 191, 192, 193, 194, 195, 198, 201, 203, - 205, 208, 211, 213, 215, 216, 219, 222, 224, 226, - 227, 228, 229, 230, 233, 236, 238, 240, 241, 242, - 244, 245, 248, 251, 253, 255, 256, 260, 265, 266, - 269, 272, 274, 276, 277, 280, 283, 285, 287, 288, - 289, 292, 295, 297, 299, 300, 301, 302, 304, 305, - 306, 307, 308, 311, 314, 316, 318, 319, 320, 323, - 326, 328, 330, 333, 336, 338, 340, 341, 342, 343, - 344, 345, 347, 349, 350, 351, 352, 354, 355, 358, + 167, 168, 173, 174, 175, 176, 177, 180, 183, 185, + 187, 188, 190, 191, 195, 196, 197, 200, 203, 205, + 207, 210, 213, 215, 217, 220, 223, 225, 227, 228, + 231, 234, 236, 238, 239, 240, 241, 242, 245, 248, + 250, 252, 253, 254, 256, 257, 260, 263, 265, 267, + 268, 272, 275, 278, 280, 282, 283, 286, 289, 291, + 293, 294, 297, 300, 302, 304, 305, 306, 309, 312, + 314, 316, 317, 318, 319, 321, 322, 323, 324, 325, + 328, 331, 333, 335, 336, 337, 340, 343, 345, 347, + 348, 349, 350, 351, 353, 355, 356, 357, 358, 360, - 361, 363, 365, 366, 369, 372, 374, 376, 377, 378, - 380, 381, 385, 387, 388, 389, 391, 392, 394, 395, - 397, 399, 400, 402, 405, 406, 408, 411, 414, 416, - 418, 420, 421, 422, 424, 425, 426, 429, 432, 434, - 436, 437, 438, 439, 440, 441, 442, 444, 446, 447, - 449, 451, 452, 454, 456, 456 + 361, 364, 367, 369, 371, 372, 374, 375, 379, 381, + 382, 383, 385, 386, 388, 389, 391, 393, 394, 396, + 397, 399, 402, 405, 407, 409, 411, 412, 413, 415, + 416, 417, 420, 423, 425, 427, 428, 429, 430, 431, + 432, 433, 435, 437, 438, 440, 442, 443, 445, 447, + 447 } ; static yyconst flex_int32_t yy_ec[256] = @@ -492,244 +495,238 @@ static yyconst flex_int32_t yy_meta[34] 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[313] = +static yyconst flex_int16_t yy_base[308] = { 0, - 0, 0, 572, 560, 559, 551, 32, 35, 662, 662, - 44, 62, 30, 40, 32, 50, 533, 49, 47, 59, - 68, 525, 69, 517, 72, 0, 662, 515, 662, 83, - 91, 0, 0, 100, 501, 109, 0, 78, 51, 86, - 89, 74, 96, 105, 109, 110, 111, 112, 117, 73, - 119, 118, 121, 120, 122, 0, 134, 0, 0, 138, - 0, 0, 495, 130, 144, 129, 143, 145, 146, 147, - 148, 149, 153, 154, 155, 158, 161, 165, 166, 170, - 180, 0, 0, 662, 171, 201, 176, 175, 178, 183, - 465, 182, 190, 455, 212, 188, 221, 208, 224, 234, + 0, 0, 546, 538, 533, 521, 32, 35, 656, 656, + 44, 62, 30, 41, 50, 51, 507, 64, 47, 66, + 67, 499, 68, 487, 72, 0, 656, 465, 656, 87, + 91, 0, 0, 100, 452, 109, 0, 74, 95, 87, + 32, 96, 105, 110, 77, 97, 40, 113, 116, 112, + 118, 120, 121, 122, 123, 125, 0, 137, 0, 0, + 147, 0, 0, 449, 129, 126, 134, 143, 145, 147, + 148, 149, 151, 153, 156, 160, 155, 167, 162, 175, + 168, 159, 188, 0, 0, 656, 166, 197, 179, 185, + 176, 200, 435, 186, 193, 216, 225, 205, 234, 221, - 209, 230, 236, 221, 244, 0, 247, 0, 184, 248, - 244, 269, 231, 247, 251, 258, 272, 0, 279, 0, - 283, 0, 286, 0, 255, 290, 0, 293, 0, 270, - 281, 455, 254, 297, 0, 0, 0, 0, 294, 662, - 295, 308, 0, 310, 0, 257, 319, 328, 304, 331, - 0, 0, 0, 0, 335, 0, 0, 0, 0, 316, - 338, 0, 0, 0, 0, 333, 336, 447, 662, 429, - 338, 340, 348, 0, 0, 0, 0, 428, 351, 0, - 355, 0, 359, 0, 362, 0, 357, 427, 308, 369, - 426, 662, 425, 662, 346, 365, 423, 662, 371, 0, + 237, 247, 204, 230, 244, 213, 254, 0, 256, 0, + 251, 258, 254, 279, 256, 259, 267, 0, 269, 0, + 286, 0, 288, 0, 290, 0, 297, 0, 267, 299, + 0, 301, 0, 288, 297, 421, 302, 310, 0, 0, + 0, 0, 305, 656, 307, 319, 0, 321, 0, 322, + 332, 335, 0, 0, 0, 0, 339, 0, 0, 0, + 0, 342, 0, 0, 0, 0, 340, 349, 0, 0, + 0, 0, 337, 345, 420, 656, 419, 346, 350, 358, + 0, 0, 0, 0, 418, 360, 0, 362, 0, 417, + 319, 369, 416, 656, 415, 656, 276, 364, 414, 656, - 0, 0, 0, 378, 0, 0, 0, 0, 380, 421, - 662, 388, 420, 0, 419, 662, 373, 418, 662, 372, - 382, 417, 662, 398, 416, 662, 400, 0, 402, 0, - 0, 385, 415, 662, 390, 275, 409, 0, 0, 0, - 0, 405, 404, 406, 264, 412, 224, 129, 662, 87, - 662, 47, 662, 662, 662, 434, 438, 441, 445, 449, - 453, 457, 461, 465, 469, 473, 477, 481, 485, 489, - 493, 497, 501, 505, 509, 513, 517, 521, 525, 529, - 533, 537, 541, 545, 549, 553, 557, 561, 565, 569, - 573, 577, 581, 585, 589, 593, 597, 601, 605, 609, + 375, 0, 0, 0, 0, 413, 656, 384, 412, 0, + 410, 656, 370, 409, 656, 370, 378, 408, 656, 366, + 656, 394, 0, 396, 0, 0, 380, 316, 656, 377, + 387, 398, 0, 0, 0, 0, 399, 402, 407, 271, + 406, 228, 200, 656, 175, 656, 77, 656, 656, 656, + 428, 432, 435, 439, 443, 447, 451, 455, 459, 463, + 467, 471, 475, 479, 483, 487, 491, 495, 499, 503, + 507, 511, 515, 519, 523, 527, 531, 535, 539, 543, + 547, 551, 555, 559, 563, 567, 571, 575, 579, 583, + 587, 591, 595, 599, 603, 607, 611, 615, 619, 623, - 613, 617, 621, 625, 629, 633, 637, 641, 645, 649, - 653, 657 + 627, 631, 635, 639, 643, 647, 651 } ; -static yyconst flex_int16_t yy_def[313] = +static yyconst flex_int16_t yy_def[308] = { 0, - 255, 1, 256, 256, 255, 257, 258, 258, 255, 255, - 259, 259, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 260, 255, 257, 255, 261, - 258, 262, 262, 263, 12, 257, 264, 12, 12, 12, + 250, 1, 251, 251, 250, 252, 253, 253, 250, 250, + 254, 254, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 255, 250, 252, 250, 256, + 253, 257, 257, 258, 12, 252, 259, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 260, 261, 262, 262, 265, - 266, 266, 255, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 255, 256, 257, 257, + 260, 261, 261, 250, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 265, 266, 266, 255, 12, 267, 12, 12, 12, 12, - 12, 12, 12, 36, 268, 12, 269, 12, 12, 270, + 12, 12, 260, 261, 261, 250, 12, 262, 12, 12, + 12, 12, 12, 12, 12, 263, 264, 12, 265, 12, - 12, 12, 12, 12, 271, 272, 267, 272, 12, 12, - 12, 273, 12, 12, 12, 257, 274, 275, 268, 275, - 276, 277, 269, 277, 12, 278, 279, 270, 279, 12, - 12, 280, 12, 271, 272, 272, 281, 281, 12, 255, - 12, 282, 283, 273, 283, 12, 284, 285, 257, 274, - 275, 275, 286, 286, 276, 277, 277, 287, 287, 12, - 278, 279, 279, 288, 288, 12, 12, 289, 255, 290, - 12, 12, 282, 283, 283, 291, 291, 292, 293, 294, - 284, 294, 295, 296, 285, 296, 257, 297, 12, 298, - 289, 255, 299, 255, 12, 300, 301, 255, 293, 294, + 12, 266, 12, 12, 12, 12, 267, 268, 262, 268, + 12, 12, 12, 269, 12, 12, 270, 271, 263, 271, + 272, 273, 264, 273, 274, 275, 265, 275, 12, 276, + 277, 266, 277, 12, 12, 278, 12, 267, 268, 268, + 279, 279, 12, 250, 12, 280, 281, 269, 281, 12, + 282, 270, 271, 271, 283, 283, 272, 273, 273, 284, + 284, 274, 275, 275, 285, 285, 12, 276, 277, 277, + 286, 286, 12, 12, 287, 250, 288, 12, 12, 280, + 281, 281, 289, 289, 290, 291, 292, 282, 292, 293, + 12, 294, 287, 250, 295, 250, 12, 296, 297, 250, - 294, 302, 302, 295, 296, 296, 303, 303, 257, 304, - 255, 305, 306, 306, 299, 255, 12, 307, 255, 307, - 307, 301, 255, 285, 304, 255, 308, 309, 305, 309, - 306, 12, 307, 255, 307, 307, 308, 309, 309, 310, - 310, 12, 307, 307, 311, 307, 307, 312, 255, 307, - 255, 312, 255, 255, 0, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 291, 292, 292, 298, 298, 299, 250, 300, 301, 301, + 295, 250, 12, 302, 250, 302, 302, 297, 250, 299, + 250, 303, 304, 300, 304, 301, 12, 302, 250, 302, + 302, 303, 304, 304, 305, 305, 12, 302, 302, 306, + 302, 302, 307, 250, 302, 250, 307, 250, 250, 0, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255 + 250, 250, 250, 250, 250, 250, 250 } ; -static yyconst flex_int16_t yy_nxt[696] = +static yyconst flex_int16_t yy_nxt[690] = { 0, 6, 7, 8, 9, 6, 6, 6, 6, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 17, 17, 17, 17, 19, 17, 20, 21, 22, 23, 24, 17, 25, 17, 17, 31, 31, 32, 31, 31, 32, 35, 33, 35, 41, 33, 28, 28, 28, 29, 34, 35, - 249, 36, 37, 42, 43, 38, 35, 48, 35, 35, - 35, 39, 28, 28, 28, 29, 34, 44, 35, 36, - 37, 40, 46, 45, 65, 49, 47, 35, 35, 50, - 52, 35, 35, 35, 54, 28, 58, 35, 55, 64, - 254, 59, 31, 31, 32, 35, 75, 66, 35, 33, + 35, 36, 37, 73, 42, 38, 35, 49, 68, 35, + 35, 39, 28, 28, 28, 29, 34, 43, 45, 36, + 37, 40, 44, 35, 46, 35, 35, 35, 51, 53, + 244, 35, 50, 35, 55, 65, 35, 47, 56, 28, + 59, 48, 31, 31, 32, 60, 35, 71, 67, 33, - 28, 28, 28, 29, 68, 35, 48, 28, 37, 60, - 60, 60, 61, 60, 35, 67, 60, 62, 35, 35, - 35, 35, 72, 71, 73, 69, 35, 35, 35, 35, - 35, 35, 253, 80, 76, 70, 28, 58, 35, 35, - 28, 82, 59, 85, 77, 78, 83, 79, 87, 74, - 76, 86, 35, 35, 35, 35, 35, 35, 35, 90, - 94, 95, 35, 35, 35, 97, 88, 35, 91, 92, - 35, 99, 100, 89, 35, 35, 93, 101, 98, 35, - 35, 102, 28, 82, 35, 35, 96, 35, 83, 109, - 112, 35, 35, 35, 76, 97, 110, 35, 104, 35, + 28, 28, 28, 29, 35, 35, 35, 28, 37, 61, + 61, 61, 62, 61, 35, 70, 61, 63, 66, 35, + 49, 35, 35, 72, 74, 35, 69, 35, 75, 35, + 35, 35, 35, 88, 35, 35, 82, 78, 35, 28, + 59, 77, 87, 35, 76, 60, 80, 79, 81, 28, + 84, 78, 35, 89, 35, 85, 35, 35, 35, 75, + 35, 92, 35, 96, 35, 35, 90, 97, 35, 35, + 93, 35, 94, 91, 99, 35, 35, 35, 249, 100, + 95, 101, 102, 104, 35, 35, 98, 103, 35, 105, + 28, 84, 111, 106, 35, 35, 85, 107, 107, 61, - 103, 105, 105, 60, 106, 105, 139, 115, 105, 108, - 111, 114, 117, 117, 60, 118, 117, 35, 35, 117, - 120, 121, 121, 60, 122, 121, 130, 251, 121, 124, - 35, 100, 125, 35, 126, 126, 60, 127, 126, 35, - 35, 126, 129, 131, 132, 35, 28, 135, 133, 28, - 137, 140, 136, 35, 147, 138, 35, 35, 148, 146, - 35, 29, 170, 35, 35, 178, 35, 249, 141, 142, - 142, 60, 143, 142, 28, 151, 142, 145, 219, 35, - 152, 28, 153, 160, 149, 28, 156, 154, 28, 158, - 35, 157, 28, 162, 159, 28, 164, 166, 163, 28, + 108, 107, 35, 248, 107, 110, 112, 114, 113, 35, + 75, 78, 99, 35, 35, 116, 117, 117, 61, 118, + 117, 134, 35, 117, 120, 121, 121, 61, 122, 121, + 35, 246, 121, 124, 125, 125, 61, 126, 125, 35, + 137, 125, 128, 135, 102, 129, 35, 130, 130, 61, + 131, 130, 136, 35, 130, 133, 28, 139, 28, 141, + 35, 144, 140, 35, 142, 35, 151, 35, 35, 28, + 153, 28, 155, 143, 244, 154, 35, 156, 145, 146, + 146, 61, 147, 146, 150, 35, 146, 149, 28, 158, + 28, 160, 28, 163, 159, 167, 161, 35, 164, 28, - 135, 165, 244, 35, 35, 136, 171, 29, 172, 167, - 28, 174, 28, 176, 187, 212, 175, 35, 177, 179, - 179, 60, 180, 179, 188, 35, 179, 182, 183, 183, - 60, 184, 183, 28, 151, 183, 186, 28, 156, 152, - 28, 162, 35, 157, 190, 35, 163, 35, 196, 35, - 28, 174, 189, 28, 200, 35, 175, 28, 202, 201, - 29, 28, 205, 203, 28, 207, 195, 206, 219, 209, - 208, 63, 214, 28, 200, 234, 220, 221, 217, 201, - 28, 205, 35, 29, 235, 234, 206, 224, 227, 227, - 60, 228, 227, 219, 35, 227, 230, 232, 242, 236, + 165, 28, 169, 28, 171, 166, 35, 170, 213, 172, + 177, 35, 28, 139, 35, 173, 35, 178, 140, 215, + 179, 28, 181, 28, 183, 174, 208, 182, 35, 184, + 185, 35, 186, 186, 61, 187, 186, 28, 153, 186, + 189, 28, 158, 154, 28, 163, 35, 159, 190, 35, + 164, 28, 169, 192, 35, 35, 191, 170, 198, 35, + 28, 181, 28, 202, 28, 204, 182, 215, 203, 207, + 205, 64, 210, 229, 197, 216, 217, 28, 202, 35, + 215, 229, 230, 203, 222, 222, 61, 223, 222, 35, + 215, 222, 225, 237, 227, 231, 28, 233, 28, 235, - 28, 207, 28, 238, 28, 240, 208, 219, 239, 219, - 241, 28, 238, 245, 35, 219, 243, 239, 219, 211, - 198, 234, 194, 231, 226, 247, 223, 246, 216, 169, - 211, 198, 194, 250, 26, 26, 26, 26, 28, 28, - 28, 30, 30, 30, 30, 35, 35, 35, 35, 56, - 192, 56, 56, 57, 57, 57, 57, 59, 169, 59, - 59, 34, 34, 34, 34, 63, 63, 116, 63, 81, - 81, 81, 81, 83, 113, 83, 83, 107, 107, 107, - 107, 119, 119, 119, 119, 123, 123, 123, 123, 128, - 128, 128, 128, 134, 134, 134, 134, 136, 84, 136, + 28, 233, 234, 238, 236, 215, 234, 240, 35, 215, + 215, 200, 229, 196, 239, 226, 221, 219, 212, 176, + 207, 200, 196, 194, 176, 241, 242, 245, 26, 26, + 26, 26, 28, 28, 28, 30, 30, 30, 30, 35, + 35, 35, 35, 57, 115, 57, 57, 58, 58, 58, + 58, 60, 86, 60, 60, 34, 34, 34, 34, 64, + 64, 35, 64, 83, 83, 83, 83, 85, 29, 85, + 85, 109, 109, 109, 109, 119, 119, 119, 119, 123, + 123, 123, 123, 127, 127, 127, 127, 132, 132, 132, + 132, 138, 138, 138, 138, 140, 54, 140, 140, 148, - 136, 144, 144, 144, 144, 150, 150, 150, 150, 152, - 35, 152, 152, 155, 155, 155, 155, 157, 29, 157, - 157, 161, 161, 161, 161, 163, 53, 163, 163, 168, - 168, 168, 168, 138, 51, 138, 138, 173, 173, 173, - 173, 175, 35, 175, 175, 181, 181, 181, 181, 185, - 185, 185, 185, 154, 29, 154, 154, 159, 255, 159, - 159, 165, 27, 165, 165, 191, 191, 191, 191, 193, - 193, 193, 193, 177, 27, 177, 177, 197, 197, 197, - 197, 199, 199, 199, 199, 201, 255, 201, 201, 204, - 204, 204, 204, 206, 255, 206, 206, 210, 210, 210, + 148, 148, 148, 152, 152, 152, 152, 154, 52, 154, + 154, 157, 157, 157, 157, 159, 35, 159, 159, 162, + 162, 162, 162, 164, 29, 164, 164, 168, 168, 168, + 168, 170, 250, 170, 170, 175, 175, 175, 175, 142, + 27, 142, 142, 180, 180, 180, 180, 182, 27, 182, + 182, 188, 188, 188, 188, 156, 250, 156, 156, 161, + 250, 161, 161, 166, 250, 166, 166, 172, 250, 172, + 172, 193, 193, 193, 193, 195, 195, 195, 195, 184, + 250, 184, 184, 199, 199, 199, 199, 201, 201, 201, + 201, 203, 250, 203, 203, 206, 206, 206, 206, 209, - 210, 213, 213, 213, 213, 215, 215, 215, 215, 218, - 218, 218, 218, 222, 222, 222, 222, 203, 255, 203, - 203, 208, 255, 208, 208, 225, 225, 225, 225, 229, - 229, 229, 229, 214, 255, 214, 214, 233, 233, 233, - 233, 237, 237, 237, 237, 239, 255, 239, 239, 241, - 255, 241, 241, 248, 248, 248, 248, 252, 252, 252, - 252, 5, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255 - + 209, 209, 209, 211, 211, 211, 211, 214, 214, 214, + 214, 218, 218, 218, 218, 205, 250, 205, 205, 220, + 220, 220, 220, 224, 224, 224, 224, 210, 250, 210, + 210, 228, 228, 228, 228, 232, 232, 232, 232, 234, + 250, 234, 234, 236, 250, 236, 236, 243, 243, 243, + 243, 247, 247, 247, 247, 5, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250 } ; -static yyconst flex_int16_t yy_chk[696] = +static yyconst flex_int16_t yy_chk[690] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 8, 8, 8, 13, - 7, 15, 13, 8, 11, 11, 11, 11, 11, 14, - 252, 11, 11, 14, 15, 11, 19, 19, 18, 16, - 39, 11, 12, 12, 12, 12, 12, 16, 20, 12, - 12, 12, 18, 16, 39, 20, 18, 21, 23, 21, - 23, 25, 50, 42, 25, 30, 30, 38, 25, 38, - 250, 30, 31, 31, 31, 40, 50, 40, 41, 31, + 7, 41, 13, 8, 11, 11, 11, 11, 11, 47, + 14, 11, 11, 47, 14, 11, 19, 19, 41, 15, + 16, 11, 12, 12, 12, 12, 12, 14, 16, 12, + 12, 12, 15, 18, 16, 20, 21, 23, 21, 23, + 247, 25, 20, 38, 25, 38, 45, 18, 25, 30, + 30, 18, 31, 31, 31, 30, 40, 45, 40, 31, - 34, 34, 34, 34, 42, 43, 43, 34, 34, 36, - 36, 36, 36, 36, 44, 41, 36, 36, 45, 46, - 47, 48, 47, 46, 48, 44, 49, 52, 51, 54, - 53, 55, 248, 54, 55, 45, 57, 57, 66, 64, - 60, 60, 57, 64, 52, 53, 60, 53, 66, 49, - 51, 65, 67, 65, 68, 69, 70, 71, 72, 69, - 73, 74, 73, 74, 75, 76, 67, 76, 70, 71, - 77, 78, 78, 68, 78, 79, 72, 78, 77, 80, - 85, 79, 81, 81, 88, 87, 75, 89, 81, 87, - 90, 92, 90, 109, 96, 96, 88, 96, 85, 93, + 34, 34, 34, 34, 39, 42, 46, 34, 34, 36, + 36, 36, 36, 36, 43, 43, 36, 36, 39, 44, + 44, 50, 48, 46, 48, 49, 42, 51, 49, 52, + 53, 54, 55, 66, 56, 66, 55, 56, 65, 58, + 58, 51, 65, 67, 50, 58, 54, 53, 54, 61, + 61, 52, 68, 67, 69, 61, 70, 71, 72, 70, + 73, 71, 74, 75, 77, 75, 68, 76, 82, 76, + 72, 79, 73, 69, 78, 87, 78, 81, 245, 79, + 74, 80, 80, 81, 80, 91, 77, 80, 89, 82, + 83, 83, 89, 87, 90, 94, 83, 88, 88, 88, - 80, 86, 86, 86, 86, 86, 109, 93, 86, 86, - 89, 92, 95, 95, 95, 95, 95, 98, 101, 95, - 95, 97, 97, 97, 97, 97, 101, 247, 97, 97, - 104, 99, 98, 99, 100, 100, 100, 100, 100, 102, - 113, 100, 100, 102, 103, 103, 105, 105, 104, 107, - 107, 110, 105, 111, 114, 107, 114, 110, 115, 113, - 115, 116, 133, 133, 125, 146, 146, 245, 111, 112, - 112, 112, 112, 112, 117, 117, 112, 112, 236, 130, - 117, 119, 119, 125, 116, 121, 121, 119, 123, 123, - 131, 121, 126, 126, 123, 128, 128, 130, 126, 134, + 88, 88, 95, 243, 88, 88, 90, 92, 91, 92, + 95, 98, 98, 103, 98, 94, 96, 96, 96, 96, + 96, 103, 106, 96, 96, 97, 97, 97, 97, 97, + 100, 242, 97, 97, 99, 99, 99, 99, 99, 104, + 106, 99, 99, 104, 101, 100, 101, 102, 102, 102, + 102, 102, 105, 105, 102, 102, 107, 107, 109, 109, + 111, 112, 107, 113, 109, 115, 116, 112, 116, 117, + 117, 119, 119, 111, 240, 117, 129, 119, 113, 114, + 114, 114, 114, 114, 115, 197, 114, 114, 121, 121, + 123, 123, 125, 125, 121, 129, 123, 134, 125, 127, - 134, 128, 236, 139, 141, 134, 139, 149, 141, 131, - 142, 142, 144, 144, 149, 189, 142, 189, 144, 147, - 147, 147, 147, 147, 160, 160, 147, 147, 148, 148, - 148, 148, 148, 150, 150, 148, 148, 155, 155, 150, - 161, 161, 166, 155, 167, 167, 161, 171, 172, 172, - 173, 173, 166, 179, 179, 195, 173, 181, 181, 179, - 187, 183, 183, 181, 185, 185, 171, 183, 196, 187, - 185, 190, 190, 199, 199, 220, 196, 196, 195, 199, - 204, 204, 217, 209, 220, 221, 204, 209, 212, 212, - 212, 212, 212, 235, 232, 212, 212, 217, 232, 221, + 127, 130, 130, 132, 132, 127, 135, 130, 197, 132, + 137, 137, 138, 138, 143, 134, 145, 143, 138, 228, + 145, 146, 146, 148, 148, 135, 191, 146, 191, 148, + 150, 150, 151, 151, 151, 151, 151, 152, 152, 151, + 151, 157, 157, 152, 162, 162, 173, 157, 167, 167, + 162, 168, 168, 174, 174, 178, 173, 168, 179, 179, + 180, 180, 186, 186, 188, 188, 180, 198, 186, 220, + 188, 192, 192, 216, 178, 198, 198, 201, 201, 213, + 230, 217, 216, 201, 208, 208, 208, 208, 208, 227, + 231, 208, 208, 227, 213, 217, 222, 222, 224, 224, - 224, 224, 227, 227, 229, 229, 224, 243, 227, 244, - 229, 237, 237, 242, 242, 246, 235, 237, 233, 225, - 222, 218, 215, 213, 210, 244, 197, 243, 193, 191, - 188, 178, 170, 246, 256, 256, 256, 256, 257, 257, - 257, 258, 258, 258, 258, 259, 259, 259, 259, 260, - 168, 260, 260, 261, 261, 261, 261, 262, 132, 262, - 262, 263, 263, 263, 263, 264, 264, 94, 264, 265, - 265, 265, 265, 266, 91, 266, 266, 267, 267, 267, - 267, 268, 268, 268, 268, 269, 269, 269, 269, 270, - 270, 270, 270, 271, 271, 271, 271, 272, 63, 272, + 232, 232, 222, 230, 224, 238, 232, 237, 237, 241, + 239, 218, 214, 211, 231, 209, 206, 199, 195, 193, + 190, 185, 177, 175, 136, 238, 239, 241, 251, 251, + 251, 251, 252, 252, 252, 253, 253, 253, 253, 254, + 254, 254, 254, 255, 93, 255, 255, 256, 256, 256, + 256, 257, 64, 257, 257, 258, 258, 258, 258, 259, + 259, 35, 259, 260, 260, 260, 260, 261, 28, 261, + 261, 262, 262, 262, 262, 263, 263, 263, 263, 264, + 264, 264, 264, 265, 265, 265, 265, 266, 266, 266, + 266, 267, 267, 267, 267, 268, 24, 268, 268, 269, - 272, 273, 273, 273, 273, 274, 274, 274, 274, 275, - 35, 275, 275, 276, 276, 276, 276, 277, 28, 277, - 277, 278, 278, 278, 278, 279, 24, 279, 279, 280, - 280, 280, 280, 281, 22, 281, 281, 282, 282, 282, - 282, 283, 17, 283, 283, 284, 284, 284, 284, 285, - 285, 285, 285, 286, 6, 286, 286, 287, 5, 287, - 287, 288, 4, 288, 288, 289, 289, 289, 289, 290, - 290, 290, 290, 291, 3, 291, 291, 292, 292, 292, - 292, 293, 293, 293, 293, 294, 0, 294, 294, 295, - 295, 295, 295, 296, 0, 296, 296, 297, 297, 297, + 269, 269, 269, 270, 270, 270, 270, 271, 22, 271, + 271, 272, 272, 272, 272, 273, 17, 273, 273, 274, + 274, 274, 274, 275, 6, 275, 275, 276, 276, 276, + 276, 277, 5, 277, 277, 278, 278, 278, 278, 279, + 4, 279, 279, 280, 280, 280, 280, 281, 3, 281, + 281, 282, 282, 282, 282, 283, 0, 283, 283, 284, + 0, 284, 284, 285, 0, 285, 285, 286, 0, 286, + 286, 287, 287, 287, 287, 288, 288, 288, 288, 289, + 0, 289, 289, 290, 290, 290, 290, 291, 291, 291, + 291, 292, 0, 292, 292, 293, 293, 293, 293, 294, - 297, 298, 298, 298, 298, 299, 299, 299, 299, 300, - 300, 300, 300, 301, 301, 301, 301, 302, 0, 302, - 302, 303, 0, 303, 303, 304, 304, 304, 304, 305, - 305, 305, 305, 306, 0, 306, 306, 307, 307, 307, - 307, 308, 308, 308, 308, 309, 0, 309, 309, 310, - 0, 310, 310, 311, 311, 311, 311, 312, 312, 312, - 312, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255 - + 294, 294, 294, 295, 295, 295, 295, 296, 296, 296, + 296, 297, 297, 297, 297, 298, 0, 298, 298, 299, + 299, 299, 299, 300, 300, 300, 300, 301, 0, 301, + 301, 302, 302, 302, 302, 303, 303, 303, 303, 304, + 0, 304, 304, 305, 0, 305, 305, 306, 306, 306, + 306, 307, 307, 307, 307, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250 } ; #define YY_TRAILING_MASK 0x2000 @@ -776,7 +773,8 @@ goto find_rule; \ * syntax; if the target string has to contain "," or ":" the new * syntax's "target=" should be used. */ -#line 31 "libxlu_disk_l.l" + +#line 35 "libxlu_disk_l.l" #include "libxlu_disk_i.h" #define YY_NO_INPUT @@ -885,7 +883,7 @@ static int vdev_and_devtype(DiskParseCon #define DPC ((DiskParseContext*)yyextra) -#line 889 "libxlu_disk_l.c" +#line 887 "libxlu_disk_l.c" #define INITIAL 0 #define LEXERR 1 @@ -1121,12 +1119,12 @@ YY_DECL register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 151 "libxlu_disk_l.l" +#line 155 "libxlu_disk_l.l" /*----- the scanner rules which do the parsing -----*/ -#line 1130 "libxlu_disk_l.c" +#line 1128 "libxlu_disk_l.c" if ( !yyg->yy_init ) { @@ -1190,14 +1188,14 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 256 ) + if ( yy_current_state >= 251 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yyg->yy_state_ptr++ = yy_current_state; ++yy_cp; } - while ( yy_current_state != 255 ); + while ( yy_current_state != 250 ); yy_find_action: yy_current_state = *--yyg->yy_state_ptr; @@ -1247,72 +1245,72 @@ do_action: /* This label is used only to case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 155 "libxlu_disk_l.l" +#line 159 "libxlu_disk_l.l" { /* ignore whitespace before parameters */ } YY_BREAK /* ordinary parameters setting enums or strings */ case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 159 "libxlu_disk_l.l" +#line 163 "libxlu_disk_l.l" { STRIP(','); setformat(DPC, FROMEQUALS); } YY_BREAK case 3: YY_RULE_SETUP -#line 161 "libxlu_disk_l.l" +#line 165 "libxlu_disk_l.l" { DPC->disk->is_cdrom = 1; } YY_BREAK case 4: YY_RULE_SETUP -#line 162 "libxlu_disk_l.l" +#line 166 "libxlu_disk_l.l" { DPC->disk->is_cdrom = 1; } YY_BREAK case 5: YY_RULE_SETUP -#line 163 "libxlu_disk_l.l" +#line 167 "libxlu_disk_l.l" { DPC->disk->is_cdrom = 0; } YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 164 "libxlu_disk_l.l" +#line 168 "libxlu_disk_l.l" { xlu__disk_err(DPC,yytext,"unknown value for type"); } YY_BREAK case 7: /* rule 7 can match eol */ YY_RULE_SETUP -#line 166 "libxlu_disk_l.l" +#line 170 "libxlu_disk_l.l" { STRIP(','); setaccess(DPC, FROMEQUALS); } YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP -#line 167 "libxlu_disk_l.l" +#line 171 "libxlu_disk_l.l" { STRIP(','); setbackendtype(DPC,FROMEQUALS); } YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP -#line 169 "libxlu_disk_l.l" +#line 173 "libxlu_disk_l.l" { STRIP(','); SAVESTRING("vdev", vdev, FROMEQUALS); } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP -#line 170 "libxlu_disk_l.l" +#line 174 "libxlu_disk_l.l" { STRIP(','); SAVESTRING("script", script, FROMEQUALS); } YY_BREAK /* the target magic parameter, eats the rest of the string */ case 11: YY_RULE_SETUP -#line 174 "libxlu_disk_l.l" +#line 178 "libxlu_disk_l.l" { STRIP(','); SAVESTRING("target", pdev_path, FROMEQUALS); } YY_BREAK /* unknown parameters */ case 12: /* rule 12 can match eol */ YY_RULE_SETUP -#line 178 "libxlu_disk_l.l" +#line 182 "libxlu_disk_l.l" { xlu__disk_err(DPC,yytext,"unknown parameter"); } YY_BREAK /* deprecated prefixes */ @@ -1320,7 +1318,7 @@ YY_RULE_SETUP * matched the whole string, so these patterns take precedence */ case 13: YY_RULE_SETUP -#line 185 "libxlu_disk_l.l" +#line 189 "libxlu_disk_l.l" { STRIP(':'); DPC->had_depr_prefix=1; DEPRECATE("use `[format=]...,'"); @@ -1329,24 +1327,31 @@ YY_RULE_SETUP YY_BREAK case 14: YY_RULE_SETUP -#line 191 "libxlu_disk_l.l" +#line 195 "libxlu_disk_l.l" { - STRIP(':'); + char *newscript; + STRIP(':'); DPC->had_depr_prefix=1; DEPRECATE("use `script=...'"); - SAVESTRING("script", script, yytext); - } + if (asprintf(&newscript, "block-%s", yytext) < 0) { + xlu__disk_err(DPC,yytext,"unable to format script"); + return 0; + } + savestring(DPC, "script respecified", + &DPC->disk->script, newscript); + free(newscript); + } YY_BREAK case 15: *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ yyg->yy_c_buf_p = yy_cp = yy_bp + 8; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 197 "libxlu_disk_l.l" +#line 208 "libxlu_disk_l.l" { DPC->had_depr_prefix=1; DEPRECATE(0); } YY_BREAK case 16: YY_RULE_SETUP -#line 198 "libxlu_disk_l.l" +#line 209 "libxlu_disk_l.l" { DPC->had_depr_prefix=1; DEPRECATE(0); } YY_BREAK case 17: @@ -1354,7 +1359,7 @@ case 17: yyg->yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 199 "libxlu_disk_l.l" +#line 210 "libxlu_disk_l.l" { DPC->had_depr_prefix=1; DEPRECATE(0); } YY_BREAK case 18: @@ -1362,7 +1367,7 @@ case 18: yyg->yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 200 "libxlu_disk_l.l" +#line 211 "libxlu_disk_l.l" { DPC->had_depr_prefix=1; DEPRECATE(0); } YY_BREAK case 19: @@ -1370,7 +1375,7 @@ case 19: yyg->yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 201 "libxlu_disk_l.l" +#line 212 "libxlu_disk_l.l" { DPC->had_depr_prefix=1; DEPRECATE(0); } YY_BREAK case 20: @@ -1378,13 +1383,13 @@ case 20: yyg->yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 202 "libxlu_disk_l.l" +#line 213 "libxlu_disk_l.l" { DPC->had_depr_prefix=1; DEPRECATE(0); } YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP -#line 204 "libxlu_disk_l.l" +#line 215 "libxlu_disk_l.l" { xlu__disk_err(DPC,yytext,"unknown deprecated disk prefix"); return 0; @@ -1394,7 +1399,7 @@ YY_RULE_SETUP case 22: /* rule 22 can match eol */ YY_RULE_SETUP -#line 211 "libxlu_disk_l.l" +#line 222 "libxlu_disk_l.l" { STRIP(','); @@ -1423,7 +1428,7 @@ YY_RULE_SETUP YY_BREAK case 23: YY_RULE_SETUP -#line 237 "libxlu_disk_l.l" +#line 248 "libxlu_disk_l.l" { BEGIN(LEXERR); yymore(); @@ -1431,17 +1436,17 @@ YY_RULE_SETUP YY_BREAK case 24: YY_RULE_SETUP -#line 241 "libxlu_disk_l.l" +#line 252 "libxlu_disk_l.l" { xlu__disk_err(DPC,yytext,"bad disk syntax"); return 0; } YY_BREAK case 25: YY_RULE_SETUP -#line 244 "libxlu_disk_l.l" +#line 255 "libxlu_disk_l.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1445 "libxlu_disk_l.c" +#line 1450 "libxlu_disk_l.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(LEXERR): yyterminate(); @@ -1705,7 +1710,7 @@ static int yy_get_next_buffer (yyscan_t while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 256 ) + if ( yy_current_state >= 251 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1729,11 +1734,11 @@ static int yy_get_next_buffer (yyscan_t while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 256 ) + if ( yy_current_state >= 251 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 255); + yy_is_jam = (yy_current_state == 250); if ( ! yy_is_jam ) *yyg->yy_state_ptr++ = yy_current_state; @@ -2533,4 +2538,4 @@ void xlu__disk_yyfree (void * ptr , yysc #define YYTABLES_NAME "yytables" -#line 244 "libxlu_disk_l.l" +#line 255 "libxlu_disk_l.l" diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_l.h --- a/tools/libxl/libxlu_disk_l.h Mon Aug 06 12:25:06 2012 +0100 +++ b/tools/libxl/libxlu_disk_l.h Mon Aug 06 12:28:03 2012 +0100 @@ -3,8 +3,12 @@ #define xlu__disk_yyIN_HEADER 1 #line 6 "libxlu_disk_l.h" +#line 31 "libxlu_disk_l.l" +#include "libxl_osdeps.h" /* must come before any other headers */ -#line 8 "libxlu_disk_l.h" + + +#line 12 "libxlu_disk_l.h" #define YY_INT_ALIGNED short int @@ -340,8 +344,8 @@ extern int xlu__disk_yylex (yyscan_t yys #undef YY_DECL #endif -#line 244 "libxlu_disk_l.l" +#line 255 "libxlu_disk_l.l" -#line 346 "libxlu_disk_l.h" +#line 350 "libxlu_disk_l.h" #undef xlu__disk_yyIN_HEADER #endif /* xlu__disk_yyHEADER_H */ diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_l.l --- a/tools/libxl/libxlu_disk_l.l Mon Aug 06 12:25:06 2012 +0100 +++ b/tools/libxl/libxlu_disk_l.l Mon Aug 06 12:28:03 2012 +0100 @@ -27,6 +27,10 @@ * syntax's "target=" should be used. */ +%top{ +#include "libxl_osdeps.h" /* must come before any other headers */ +} + %{ #include "libxlu_disk_i.h" @@ -188,11 +192,18 @@ target=.* { STRIP(','); SAVESTRING("targ setformat(DPC, yytext); } -iscsi:|e?nbd:drbd:/.* { - STRIP(':'); +(iscsi|e?nbd|drbd):/.* { + char *newscript; + STRIP(':'); DPC->had_depr_prefix=1; DEPRECATE("use `script=...'"); - SAVESTRING("script", script, yytext); - } + if (asprintf(&newscript, "block-%s", yytext) < 0) { + xlu__disk_err(DPC,yytext,"unable to format script"); + return 0; + } + savestring(DPC, "script respecified", + &DPC->disk->script, newscript); + free(newscript); + } tapdisk:/.* { DPC->had_depr_prefix=1; DEPRECATE(0); } tap2?:/.* { DPC->had_depr_prefix=1; DEPRECATE(0); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |