From nobody Sun Feb 20 18:15:39 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3635419CF294; Sun, 20 Feb 2022 18:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K1ts94fm0z4XZy; Sun, 20 Feb 2022 18:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645380941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wt0ypJzrO58eK/hjDPcQJsmpoFfbljzc8kEOPMV9dbs=; b=c7LbXF/h7dfLZC2srZTdBfHALxejE2JeK766cJZSUAgUmVXyT61J6i91uSuWVkWGkBWAIM xTvLGnZV7yi37mo6kM44JcL4gANE+XZitQtxlbdpwnhVkhB6FKvYStfkdlKkUTSCaYvzC0 b/CMRI+B60dJOvxMMFw5erwIQGmZ8Bsi0ywfzY4cW2mY/z+auGEOahpcXH2ZhLgGsGaMhw 0bfJCIlBLpdSHtt7M/1VTR9iS8NJvIS4jfJANBiJe9taxnB8JnVeQ0OKUxobRymm/55BRP Xt14p3xiWwYYvwXok75CVYFpFuVZB/7ooT+L82eeaRDR66E64ha4GRg2Sql8cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C827721481; Sun, 20 Feb 2022 18:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21KIFdhP022978; Sun, 20 Feb 2022 18:15:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21KIFdAY022977; Sun, 20 Feb 2022 18:15:39 GMT (envelope-from git) Date: Sun, 20 Feb 2022 18:15:39 GMT Message-Id: <202202201815.21KIFdAY022977@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 715d53ecb91c - stable/13 - LinuxKPI: add UUID_STRING_LEN and GUID_INIT to uuid.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 715d53ecb91cf7d8643aa246f6be62e037ccca23 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645380941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wt0ypJzrO58eK/hjDPcQJsmpoFfbljzc8kEOPMV9dbs=; b=PQM1VDBFSPnanjtp/LCp74uO+s1XB84Sa9hJ2oYsbBM1CCU5qe4gFe9O2KbEm8qWHiLJ5x ypNhDaGvlb3ns/40b9t/QP8bdbShmQrVhfbg4tMo3powIlJf31CkjT4xcQ1I0HH4ybh/9V i4PHFvRPNGWSW6DEc9+JTzDQiUUyWbLoEPOXrpdORd/m0iXqOiLlVClN8DHTa3Zy8nK5Yd 5JCwPDLomSxrCh0/bstn9VyO+CPul7KlIJD65j0G9XRZhXeDXGQp5eelxP/Dm786TrbnC7 J6cL6y9Ye3+H3g5kHw03EwImwedZ4pGGnqXTOhPStdFHsD8RpdCSJsC3CBuAxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645380941; a=rsa-sha256; cv=none; b=LtpOhbRemXolU7jNC6l0/fmwXnxIBBIXe+X40jzHo4su4M2SZL67BmtHZCivsIo2rrbZDi 0s0srISuLAoxengyO4WspGELaE0TX4rsrBDKS49y/WMxdSKkCXa1Rh3PKrRQyllhq1r/ab sv3YCQFkfHdBbq4B1oaGnn1Ti3xXj4PXnrbBYpmik5jWwJLr09qvrzS6LAONqVplkLYFkk cMqiAm7F5UHR8Yv2ucwV5NnYCfzi0r85esN5i/NSPc1MCFMhh4vQMxlTEpwJHDpTkj4sW8 398VHFSV9+QwGG/OZyxDeDMV0FINnxF0m7M3DpP8SXGkE2is2LfdyYbjQukXdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=715d53ecb91cf7d8643aa246f6be62e037ccca23 commit 715d53ecb91cf7d8643aa246f6be62e037ccca23 Author: Bjoern A. Zeeb AuthorDate: 2022-02-09 12:10:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-02-20 16:24:38 +0000 LinuxKPI: add UUID_STRING_LEN and GUID_INIT to uuid.h Add a definition for UUID_STRING_LEN to uuid.h as needed by a driver. Also add GUID_INIT for drm-kmod [1]. Submitted by: wulf [1] Reviewed by: hselasky (earlier), wulf Differential Revision: https://reviews.freebsd.org/D34235 (cherry picked from commit 97009980c492f5bc44a942cee09ac1ccfe4ae00a) --- sys/compat/linuxkpi/common/include/linux/uuid.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/uuid.h b/sys/compat/linuxkpi/common/include/linux/uuid.h index a1f878b311a5..31a018497f78 100644 --- a/sys/compat/linuxkpi/common/include/linux/uuid.h +++ b/sys/compat/linuxkpi/common/include/linux/uuid.h @@ -33,6 +33,28 @@ #ifndef _LINUXKPI_LINUX_UUID_H #define _LINUXKPI_LINUX_UUID_H +#define UUID_STRING_LEN 36 + +#define GUID_INIT(x0_3, x4_5, x6_7, x8, x9, x10, x11, x12, x13, x14, x15) \ + ((guid_t) { .x = { \ + [0] = (x0_3) & 0xff, \ + [1] = ((x0_3) >> 8) & 0xff, \ + [2] = ((x0_3) >> 16) & 0xff, \ + [3] = ((x0_3) >> 24) & 0xff, \ + [4] = (x4_5) & 0xff, \ + [5] = ((x4_5) >> 8) & 0xff, \ + [6] = (x6_7) & 0xff, \ + [7] = ((x6_7) >> 8) & 0xff, \ + [8] = (x8), \ + [9] = (x9), \ + [10] = (x10), \ + [11] = (x11), \ + [12] = (x12), \ + [13] = (x13), \ + [14] = (x14), \ + [15] = (x15) \ +}}) + typedef struct { char x[16]; } guid_t;