From nobody Fri Jul 15 18:03:55 2022 X-Original-To: dev-commits-src-main@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 4Lkzkh2rVKz4TGlx; Fri, 15 Jul 2022 18:03:56 +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 4Lkzkh0yzbz3RFy; Fri, 15 Jul 2022 18:03:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657908236; 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=50b9cuRtQ+Pc8EI1HHhb93Y7xvU56GqmRY+6e7aXNBQ=; b=M9mOUM1c03d1UGMXxBOWq0ikfZVVEG5apovj96+WzNJMhNvfP3LUELrTM5PD8BiAsNMk3R IPwDKUtlKmIvMye7fkP8JUg8GgD5Kq2KQlb0kODtbvHsW/R8SP/frHmB+I4BZwYecLauB+ +N0DfKxEJzRPtt+fwbqKbDb0m8DQ0BR4wTfuCsfir8slkVbl7fwr9V7QAU4YHepny6kZcQ 88eWoH8SuOI2vt/aPSGnJU+1jnuKIeXUj25Mk4rnjcYjxfE63O1lHUKVHnE00TAttBr/qN /MveSY1a6GZr1PZVGRUMfWjzjV33aXOKJB0C+zUqugFvKoMz4+HBFv/12cJ1UA== 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 4Lkzkh044XzrXR; Fri, 15 Jul 2022 18:03:56 +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 26FI3tiI060163; Fri, 15 Jul 2022 18:03:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26FI3tl6060162; Fri, 15 Jul 2022 18:03:55 GMT (envelope-from git) Date: Fri, 15 Jul 2022 18:03:55 GMT Message-Id: <202207151803.26FI3tl6060162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ae366d510684 - main - kboot: Add HOST_O_ constants for open, etc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae366d5106844c26ecec54b6926c13064a224aa9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657908236; 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=50b9cuRtQ+Pc8EI1HHhb93Y7xvU56GqmRY+6e7aXNBQ=; b=PBssv7eat+mhoY+mDNJULbXx8BSVV+Hb2OU5X7YpIWW33Ss9yCoogyQdb7Ga8FEAUb0oZz Qo+4GlXvNA28GO71yXmGBEreNwwsmEk056AlPelZsEJjqpwqZixyhaGWBqN0ilvzfMXsMt bTJhVcGSAfjnviD7TniLBDJbVvuCj0NTHwGWROPuJF819U1D0YFkRDZnbnU7lJClOPjJDp zSPfZqn4zCfHrFWmAHRuzlvF9peS6G9iw+pyw7fQqbXTtFEgkM/S8p8qJ3YxYHA+QCz/8A GcgWmsLaufFo3+Jz9TaUM+OcMfXz2du3jYBR5SiKBmGR838yBSuEn2z6RfP6Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657908236; a=rsa-sha256; cv=none; b=LEZTzpZGyQFNjHcYkEnPAi4d925d/+BLk8LqEr/cVjOSyb4EIXATUG2CHC0eMEShW9BQ47 1XN1TQbL87Sa/pE1EgaVMl6sylyJNCS/rgcunfb0lRMyiAiR18xLxLRZ+eeqCrfk7aCmjs 97CFRTxBIkqyqf0uS9UoC7lYE6n6Z97FrwO0IKSnAc5vA89foGb/agWPp68CXh+KIXESvy gm4Ho81f/QpKo0d50FFHyxMcNXHsysSDzy2qx6NaUCmwk9QWvZKQRZwXs1iIC4YABRKYp/ 7UVj/es75G5+AprVvG62H/+2u/ZSRsXngQlOGb3TDUt5Wxme2cML3c5nhl2o+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ae366d5106844c26ecec54b6926c13064a224aa9 commit ae366d5106844c26ecec54b6926c13064a224aa9 Author: Warner Losh AuthorDate: 2022-07-01 17:57:02 +0000 Commit: Warner Losh CommitDate: 2022-07-15 18:00:50 +0000 kboot: Add HOST_O_ constants for open, etc Add the common O_ constants for the open, fcntl, etc system calls. They are different than FreeBSD's. While they can differ based on architecture, they are constant for architectures we care about, and those architectures use the 'generic' version so future architectures will also work. Sponsored by: Netflix --- stand/kboot/host_syscall.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/stand/kboot/host_syscall.h b/stand/kboot/host_syscall.h index b13829e4d05b..24b966b34ed8 100644 --- a/stand/kboot/host_syscall.h +++ b/stand/kboot/host_syscall.h @@ -32,6 +32,27 @@ long host_syscall(int number, ...); +/* + * Constants for open, fcntl, etc + * + * Note: Some of these are arch dependent on Linux, but are the same for + * powerpc, x86, arm*, and riscv. We should be futureproof, though, since these + * are the 'generic' values and only older architectures (no longer supported by + * FreeBSD) vary. + * + * These are from tools/include/uapi/asm-generic/fcntl.h and use the octal + * notation. Beware, hex is used in other places creating potential confsion. + */ +#define HOST_O_RDONLY 0 +#define HOST_O_WRONLY 1 +#define HOST_O_RDWR 2 +#define HOST_O_CREAT 00100 +#define HOST_O_EXCL 00200 +#define HOST_O_NOCTTY 00400 +#define HOST_O_TRUNC 01000 +#define HOST_O_APPEND 02000 +#define HOST_O_NONBLOCK 04000 + /* * Data types */