From nobody Wed Dec 4 19:02:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 173222402893324.262943569811796; Thu, 21 Nov 2024 13:20:28 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id CDC57ECA71; Thu, 21 Nov 2024 21:20:24 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 7A8DBECA2B for ; Thu, 21 Nov 2024 21:20:08 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) for ; Thu, 21 Nov 2024 13:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732224007; x=1732828807; darn=seabios.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/RAHht3L96M3mhE+zLuEag2cb+5KPdTUqP7nT0+g0Ic=; b=Cg9Cq5E1dJH/31/S7jd9e7TqLEOYD7wQHM0GP3T7YsAjwxTa9DcWmzMdoKDGW5XS0L 3m7VtMuVabLw2Mbnhs32AOosgjpE8yiQOMCjtLgRBfNZYWm5HYniBwD/xQOjLQ4NTXXT iaK0b2M9NJB3E+7+2rh8JZp2y0TbgTjsbKtcSU8aQsKeVfPmAHP2rLeSVV7rcDHcZgdv OgLSQKVBNnpgyrtbVKbPW2NZn0qPtjtyO9Fyi2NeePwoXfvm6nbu+so+jr1BxSuWZJGe GctWXyQNOso/JUgflk+fpCfFdt93klKuGHnLVYL9vXoC04KPeVPapYpztU+X2cHAPAIs ob3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732224007; x=1732828807; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/RAHht3L96M3mhE+zLuEag2cb+5KPdTUqP7nT0+g0Ic=; b=rGxMmhuOco7mUHn44UtOwFEvaTz6d8L6xVckb54q/SXa5ifCSZsXljcuSXZobaHzZa A6G1aso3P02E2gCbffLtILhYYsFxP8zh1ygOiL4pB0IaCLUYOQ5sm/ZpbcQgY3eu5baT WHaasjW1INsDK8YSa/aMhhKddqvtouzuFSIIwqLdQMOxM4S29w2rqT4eisysMjA9TSVR KKiGmKYJllf0tfYVUQaOi3cjTqqN60TFUZfkpVvjylzII1gtMLOobnoPUharyaASJof3 Vj6Fnki6XDLIhWE70v1PHVHfY3AiPt/qy0vbnSNze6dKv/J/odWoqYbHIh/onZfFuH5s I8rw== X-Gm-Message-State: AOJu0YwTbv0V74Y46Q5MiyHy7S0elmmnfm0dFD8xQIBPsgKHrhuyVSds dszTmaVm3ru60YrudGLbhAHs5fUptdUci0kNKC5p6SPiPV1p03edkyJUq+gWoM2kbp6XLN5Uivh OlRXBpyJnJBQ/++8gGKj83bKcV6g= X-Gm-Gg: ASbGncvoQaH+lBkKMGJC9xv1oULlIPx6Hhbw8WDIm6qii1zRp4tEo82A0OcYxrlW/Xw uFKcOt5ZchWGu+87pGPO7yxpgn8T+AOs= X-Google-Smtp-Source: AGHT+IG5QhpWX1wUR10Yd3yLPqE8U0mVZT2a+JwDoEDYim9vFUB/1PJmjvNPEjXDpz1+F/KvaIZmnHQU9Z4rxpcHYm0= X-Received: by 2002:a05:6830:1510:b0:718:9d91:6a17 with SMTP id 46e09a7af769-71c04b922b2mr331505a34.11.1732224006984; Thu, 21 Nov 2024 13:20:06 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Daniel Khodabakhsh Date: Thu, 21 Nov 2024 21:19:55 +0000 Message-ID: To: kevin@koconnor.net Content-Type: multipart/mixed; boundary="0000000000009c1818062772d44a" Message-ID-Hash: MUM65WDBEVYUQGVOSQQFC2CWYXX654J6 X-Message-ID-Hash: MUM65WDBEVYUQGVOSQQFC2CWYXX654J6 X-MailFrom: d.khodabakhsh@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: seabios@seabios.org, Gerd Hoffmann X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] Re: [PATCH] Support multiple USB HID keyboards/mice List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: / X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-1.3.1/232.18.42 X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1732224030295116600 Content-Transfer-Encoding: quoted-printable --0000000000009c1818062772d44a MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 QXMgcGVyIHlvdXIgY29tbWVudHMgaW4gbXkgb3RoZXIgcGF0Y2ggS2V2aW4gSSd2ZSB1cGRhdGVk IHRoaXMgb25lCndpdGggdGhlIHNpZ25lZC1vZmYgYnkgbGluZSBhcyB3ZWxsOgoKU3VwcG9ydCBt dWx0aXBsZSBVU0IgSElEIGRldmljZXMgYnkgc3RvcmluZyB0aGVtIGluIGEgbGlua2VkIGxpc3Qu CgpTaWduZWQtb2ZmLWJ5OiBEYW5pZWwgS2hvZGF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m5fbm9hbGxv YygpOworICAgICAgICByZXR1cm4gLTE7CisgICAgfQoKKyAgICBuZXdfbm9kZS0+cGlwZSA9M0Qg cGlwZTsKKworICAgIG11dGV4X2xvY2soJnVzYl9oaWRfbG9jayk7CisgICAgbmV3X25vZGUtPm5l eHQgPTNEICpsaXN0OworICAgICpsaXN0ID0zRCBuZXdfbm9kZTsKKyAgICBtdXRleF91bmxvY2so JnVzYl9oaWRfbG9jayk7CisKKyAgICByZXR1cm4gMDsKK30KCiAvKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogU2V0dXAK QEAgLTY0LDkgKzk4LDYgQEAgdXNiX2tiZF9zZXR1cChzdHJ1Y3QgdXNiZGV2aWNlX3MgKnVzYmRl dgogewogICAgIGlmICghIENPTkZJR19VU0JfS0VZQk9BUkQpCiAgICAgICAgIHJldHVybiAtMTsK LSAgICBpZiAoa2V5Ym9hcmRfcGlwZSkKLSAgICAgICAgLy8gWFhYIC0gdGhpcyBlbmFibGVzIHRo ZSBmaXJzdCBmb3VuZCBrZXlib2FyZCAoY291bGQgYmUgcmFuZG9tKQotICAgICAgICByZXR1cm4g LTE7CgogICAgIGlmIChlcGRlc2MtPndNYXhQYWNrZXRTaXplIDwgc2l6ZW9mKHN0cnVjdCBrZXll dmVudCkKICAgICAgICAgfHwgZXBkZXNjLT53TWF4UGFja2V0U2l6ZSA+IE1BWF9LQkRfRVZFTlQp IHsKQEAgLTc2LDE5ICsxMDcsMTYgQEAgdXNiX2tiZF9zZXR1cChzdHJ1Y3QgdXNiZGV2aWNlX3Mg KnVzYmRldgogICAgIH0KCiAgICAgLy8gRW5hYmxlICJib290IiBwcm90b2NvbC4KLSAgICBpbnQg cmV0ID0zRCBzZXRfcHJvdG9jb2wodXNiZGV2LT5kZWZwaXBlLCAwLAp1c2JkZXYtPmlmYWNlLT5i SW50ZXJmYWNlTnVtYmVyKTsKLSAgICBpZiAocmV0KSB7Cisg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UFYX0tCRF9FVkVOVF07Ci0gICAgICAgIGlu dCByZXQgPTNEIHVzYl9wb2xsX2ludHIocGlwZSwgZGF0YSk7Ci0gICAgICAgIGlmIChyZXQpCi0g ICAgICAgICAgICBicmVhazsKLSAgICAgICAgaGFuZGxlX2tleSgodm9pZCopZGF0YSk7CisgICAg Zm9yIChzdHJ1Y3QgcGlwZV9ub2RlICpub2RlID0zRCBHRVRfR0xPQkFMKGtleWJvYXJkcykKKyAg ICAgICAgIG5vZGU7CisgICAgICAgICBub2RlID0zRCBHRVRfR0xPQkFMRkxBVChub2RlLT5uZXh0 KSkgeworICAgICAgICBzdHJ1Y3QgdXNiX3BpcGUgKnBpcGUgPTNEIEdFVF9HTE9CQUxGTEFUKG5v ZGUtPnBpcGUpOworCisgICAgICAgIGZvciAoOzspIHsKKyAgICAgICAgICAgIHU4IGRhdGFbTUFY X0tCRF9FVkVOVF07CisgICAgICAgICAgICBpbnQgcmV0ID0zRCB1c2JfcG9sbF9pbnRyKHBpcGUs IGRhdGEpOworICAgICAgICAgICAgaWYgKHJldCkKKyAgICAgICAgICAgICAgICBicmVhazsKKyAg ICAgICAgICAgIGhhbmRsZV9rZXkoKHZvaWQqKWRhdGEpOworICAgICAgICB9CiAgICAgfQogfQoK QEAgLTM0NCw3ICszNzAsOCBAQCB1c2Jfa2JkX2FjdGl2ZSh2b2lkKQogewogICAgIGlmICghIENP TkZJR19VU0JfS0VZQk9BUkQpCiAgICAgICAgIHJldHVybiAwOwotICAgIHJldHVybiBHRVRfR0xP QkFMKGtleWJvYXJkX3BpcGUpICE9M0QgTlVMTDsKKworICAgIHJldHVybiBHRVRfR0xPQkFMKGtl eWJvYXJkcykgIT0zRCBOVUxMOwogfQoKIC8vIEhhbmRsZSBhIHBzMiBzdHlsZSBrZXlib2FyZCBj b21tYW5kLgpAQCAtMzkwLDE2ICs0MTcsMTkgQEAgdXNiX2NoZWNrX21vdXNlKHZvaWQpCiB7CiAg ICAgaWYgKCEgQ09ORklHX1VTQl9NT1VTRSkKICAgICAgICAgcmV0dXJuOwotICAgIHN0cnVjdCB1 c2JfcGlwZSAqcGlwZSA9M0QgR0VUX0dMT0JBTChtb3VzZV9waXBlKTsKLSAgICBpZiAoIXBpcGUp Ci0gICAgICAgIHJldHVybjsKCi0gICAgZm9yICg7OykgewotICAgICAgICB1OCBkYXRhW01BWF9N T1VTRV9FVkVOVF07Ci0gICAgICAgIGludCByZXQgPTNEIHVzYl9wb2xsX2ludHIocGlwZSwgZGF0 YSk7Ci0gICAgICAgIGlmIChyZXQpCi0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgaGFuZGxl X21vdXNlKCh2b2lkKilkYXRhKTsKKyAgICBmb3IgKHN0cnVjdCBwaXBlX25vZGUgKm5vZGUgPTNE IEdFVF9HTE9CQUwobWljZSk7CisgICAgICAgICBub2RlOworICAgICAgICAgbm9kZSA9M0QgR0VU X0dMT0JBTEZMQVQobm9kZS0+bmV4dCkpIHsKKyAgICAgICAgc3RydWN0IHVzYl9waXBlICpwaXBl ID0zRCBHRVRfR0xPQkFMRkxBVChub2RlLT5waXBlKTsKKworICAgICAgICBmb3IgKDs7KSB7Cisg ICAgICAgICAgICB1OCBkYXRhW01BWF9NT1VTRV9FVkVOVF07CisgICAgICAgICAgICBpbnQgcmV0 ID0zRCB1c2JfcG9sbF9pbnRyKHBpcGUsIGRhdGEpOworICAgICAgICAgICAgaWYgKHJldCkKKyAg ICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGhhbmRsZV9tb3VzZSgodm9pZCopZGF0 YSk7CisgICAgICAgIH0KICAgICB9CiB9CgpAQCAtNDA5LDcgKzQzOSw4IEBAIHVzYl9tb3VzZV9h Y3RpdmUodm9pZCkKIHsKICAgICBpZiAoISBDT05GSUdfVVNCX01PVVNFKQogICAgICAgICByZXR1 cm4gMDsKLSAgICByZXR1cm4gR0VUX0dMT0JBTChtb3VzZV9waXBlKSAhPTNEIE5VTEw7CisKKyAg ICByZXR1cm4gR0VUX0dMT0JBTChtaWNlKSAhPTNEIE5VTEw7CiB9CgogLy8gSGFuZGxlIGEgcHMy IHN0eWxlIG1vdXNlIGNvbW1hbmQuCi0tPTIwCjIuNDYuMA== --0000000000009c1818062772d44a Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Support-multiple-USB-HID-devices-5.patch" Content-Disposition: attachment; filename="0001-Support-multiple-USB-HID-devices-5.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m3rtftkn0 U3VwcG9ydCBtdWx0aXBsZSBVU0IgSElEIGRldmljZXMgYnkgc3RvcmluZyB0aGVtIGluIGEgbGlu a2VkIGxpc3QuCgpTaWduZWQtb2ZmLWJ5OiBEYW5pZWwgS2hvZGFiYWtoc2ggPGQua2hvZGFiYWto c2hAZ21haWwuY29tPgotLS0KIHNyYy9ody91c2ItaGlkLmMgfCAxMDkgKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrLS0tLS0tLS0tLS0tLS0tLS0KIDEgZmlsZSBjaGFuZ2VkLCA3MCBpbnNl cnRpb25zKCspLCAzOSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9zcmMvaHcvdXNiLWhpZC5j IGIvc3JjL2h3L3VzYi1oaWQuYwppbmRleCBkZWMxOThhYy4uMzRlNjgwMmYgMTAwNjQ0Ci0tLSBh L3NyYy9ody91c2ItaGlkLmMKKysrIGIvc3JjL2h3L3VzYi1oaWQuYwpAQCAtMSwyMCArMSw1NCBA QAogLy8gQ29kZSBmb3IgaGFuZGxpbmcgVVNCIEh1bWFuIEludGVyZmFjZSBEZXZpY2VzIChISUQp LgogLy8KIC8vIENvcHlyaWdodCAoQykgMjAwOSAgS2V2aW4gTydDb25ub3IgPGtldmluQGtvY29u bm9yLm5ldD4KKy8vIENvcHlyaWdodCAoQykgMjAyNCAgRGFuaWVsIEtob2RhYmFraHNoIDxkLmto b2RhYmFraHNoQGdtYWlsLmNvbT4KIC8vCiAvLyBUaGlzIGZpbGUgbWF5IGJlIGRpc3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Y3QgdXNiZGV2 aWNlX3MgKnVzYmRldgorICAgICAgICAgICAgICAsIHN0cnVjdCB1c2JfZW5kcG9pbnRfZGVzY3Jp cHRvciAqZXBkZXNjKQoreworICAgIHN0cnVjdCB1c2JfcGlwZSAqcGlwZSA9IHVzYl9hbGxvY19w aXBlKHVzYmRldiwgZXBkZXNjKTsKKyAgICBpZiAoIXBpcGUpCisgICAgICAgIHJldHVybiAtMTsK KworICAgIHN0cnVjdCBwaXBlX25vZGUgKm5ld19ub2RlID0gbWFsbG9jX2ZzZWcoc2l6ZW9mKHN0 cnVjdCBwaXBlX25vZGUpKTsKKyAgICBpZiAoIW5ld19ub2RlKSB7CisgICAgICAgIHdhcm5fbm9h bGxvYygpOworICAgICAgICByZXR1cm4gLTE7CisgICAgfQogCisgICAgbmV3X25vZGUtPnBpcGUg PSBwaXBlOworCisgICAgbXV0ZXhfbG9jaygmdXNiX2hpZF9sb2NrKTsKKyAgICBuZXdfbm9kZS0+ bmV4dCA9ICpsaXN0OworICAgICpsaXN0ID0gbmV3X25vZGU7CisgICAgbXV0ZXhfdW5sb2NrKCZ1 c2JfaGlkX2xvY2spOworCisgICAgcmV0dXJuIDA7Cit9CiAKIC8qKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBTZXR1cApA QCAtNjQsOSArOTgsNiBAQCB1c2Jfa2JkX3NldHVwKHN0cnVjdCB1c2JkZXZpY2VfcyAqdXNiZGV2 CiB7CiAgICAgaWYgKCEgQ09ORklHX1VTQl9LRVlCT0FSRCkKICAgICAgICAgcmV0dXJuIC0xOwot ICAgIGlmIChrZXlib2FyZF9waXBlKQotICAgICAgICAvLyBYWFggLSB0aGlzIGVuYWJsZXMgdGhl IGZpcnN0IGZvdW5kIGtleWJvYXJkIChjb3VsZCBiZSByYW5kb20pCi0gICAgICAgIHJldHVybiAt MTsKIAogICAgIGlmIChlcGRlc2MtPndNYXhQYWNrZXRTaXplI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lcGRlc2MpKQogICAgICAgICByZXR1cm4gLTE7CiAKICAgICBkcHJp bnRmKDEsICJVU0IgbW91c2UgaW5pdGlhbGl6ZWRcbiIpOwpAQCAtMzI1LDE2ICszNDgsMTkgQEAg dXNiX2NoZWNrX2tleSh2b2lkKQogewogICAgIGlmICghIENPTkZJR19VU0JfS0VZQk9BUkQpCiAg ICAgICAgIHJldHVybjsKLSAgICBzdHJ1Y3QgdXNiX3BpcGUgKnBpcGUgPSBHRVRfR0xPQkFMKGtl eWJvYXJkX3BpcGUpOwotICAgIGlmICghcGlwZSkKLSAgICAgICAgcmV0dXJuOwogCi0gICAgZm9y ICg7OykgewotICAgICAgICB1OCBkYXRhW01BWF9LQkRfRVZFTlRdOwotICAgICAgICBpbnQgcmV0 ID0gdXNiX3BvbGxfaW50cihwaXBlLCBkYXRhKTsKLSAgICAgICAgaWYgKHJldCkKLSAgICAgICAg ICAgIGJyZWFrOwotICAgICAgICBoYW5kbGVfa2V5KCh2b2lkKilkYXRhKTsKKyAgICBmb3IgKHN0 cnVjdCBwaXBlX25vZGUgKm5vZGUgPSBHRVRfR0xPQkFMKGtleWJvYXJkcykKKyAgICAgICAgIG5v ZGU7CisgICAgICAgICBub2RlID0gR0VUX0dMT0JBTEZMQVQobm9kZS0+bmV4dCkpIHsKKyAgICAg ICAgc3RydWN0IHVzYl9waXBlICpwaXBlID0gR0VUX0dMT0JBTEZMQVQobm9kZS0+cGlwZSk7CisK KyAgICAgICAgZm9yICg7OykgeworICAgICAgICAgICAgdTggZGF0YVtNQVhfS0JEX0VWRU5UXTsK KyAgICAgICAgICAgIGludCByZXQgPSB1c2JfcG9sbF9pbnRyKHBpcGUsIGRhdGEpOworICAgICAg ICAgICAgaWYgKHJldCkKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGhhbmRs ZV9rZXkoKHZvaWQqKWRhdGEpOworICAgICAgICB9CiAgICAgfQogfQogCkBAIC0zNDQsNyArMzcw LDggQEAgdXNiX2tiZF9hY3RpdmUodm9pZCkKIHsKICAgICBpZiAoISBDT05GSUdfVVNCX0tFWUJP QVJEKQogICAgICAgICByZXR1cm4gMDsKLSAgICByZXR1cm4gR0VUX0dMT0JBTChrZXlib2FyZF9w aXBlKSAhPSBOVUxMOworCisgICAgcmV0dXJuIEdFVF9HTE9CQUwoa2V5Ym9hcmRzKSAhPSBOVUxM OwogfQogCiAvLyBIYW5kbGUgYSBwczIgc3R5bGUga2V5Ym9hcmQgY29tbWFuZC4KQEAgLTM5MCwx NiArNDE3LDE5IEBAIHVzYl9jaGVja19tb3VzZSh2b2lkKQogewogICAgIGlmICghIENPTkZJR19V U0JfTU9VU0UpCiAgICAgICAgIHJldHVybjsKLSAgICBzdHJ1Y3QgdXNiX3BpcGUgKnBpcGUgPSBH RVRfR0xPQkFMKG1vdXNlX3BpcGUpOwotICAgIGlmICghcGlwZSkKLSAgICAgICAgcmV0dXJuOwog Ci0gICAgZm9yICg7OykgewotICAgICAgICB1OCBkYXRhW01BWF9NT1VTRV9FVkVOVF07Ci0gICAg ICAgIGludCByZXQgPSB1c2JfcG9sbF9pbnRyKHBpcGUsIGRhdGEpOwotICAgICAgICBpZiAocmV0 KQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGhhbmRsZV9tb3VzZSgodm9pZCopZGF0YSk7 CisgICAgZm9yIChzdHJ1Y3QgcGlwZV9ub2RlICpub2RlID0gR0VUX0dMT0JBTChtaWNlKTsKKyAg ICAgICAgIG5vZGU7CisgICAgICAgICBub2RlID0gR0VUX0dMT0JBTEZMQVQobm9kZS0+bmV4dCkp IHsKKyAgICAgICAgc3RydWN0IHVzYl9waXBlICpwaXBlID0gR0VUX0dMT0JBTEZMQVQobm9kZS0+ cGlwZSk7CisKKyAgICAgICAgZm9yICg7OykgeworICAgICAgICAgICAgdTggZGF0YVtNQVhfTU9V U0VfRVZFTlRdOworICAgICAgICAgICAgaW50IHJldCA9IHVzYl9wb2xsX2ludHIocGlwZSwgZGF0 YSk7CisgICAgICAgICAgICBpZiAocmV0KQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAg ICAgICAgaGFuZGxlX21vdXNlKCh2b2lkKilkYXRhKTsKKyAgICAgICAgfQogICAgIH0KIH0KIApA QCAtNDA5LDcgKzQzOSw4IEBAIHVzYl9tb3VzZV9hY3RpdmUodm9pZCkKIHsKICAgICBpZiAoISBD T05GSUdfVVNCX01PVVNFKQogICAgICAgICByZXR1cm4gMDsKLSAgICByZXR1cm4gR0VUX0dMT0JB TChtb3VzZV9waXBlKSAhPSBOVUxMOworCisgICAgcmV0dXJuIEdFVF9HTE9CQUwobWljZSkgIT0g TlVMTDsKIH0KIAogLy8gSGFuZGxlIGEgcHMyIHN0eWxlIG1vdXNlIGNvbW1hbmQuCi0tIAoyLjQ2 LjAKCg== --0000000000009c1818062772d44a Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org --0000000000009c1818062772d44a--