From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 314EEC433EF for ; Mon, 18 Oct 2021 19:14:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECB6E60F12 for ; Mon, 18 Oct 2021 19:14:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ECB6E60F12 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bsdimp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:50724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcY5N-0003hI-3I for qemu-devel@archiver.kernel.org; Mon, 18 Oct 2021 15:14:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcXtX-0008Mc-Ee for qemu-devel@nongnu.org; Mon, 18 Oct 2021 15:02:01 -0400 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]:43730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcXtV-0001rb-Ir for qemu-devel@nongnu.org; Mon, 18 Oct 2021 15:01:59 -0400 Received: by mail-il1-x129.google.com with SMTP id a8so15941508ilj.10 for ; Mon, 18 Oct 2021 12:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gBuwZiJ9BJDMY4BHAGpRW/Ll8SJFKvYBNDg389aCn34=; b=eoi3R+RuM77VhxdANFk7Uv7rRU6+OhXQfHo/VMLpBVJCCRuXtc9rq3Qjeo45tHp47I 50a8hWy8eebvgVA51kmS4OiLsVbKX1wJvGva6uKOSqxCtY/em9IoQDgsP5VVvJqHkYJ+ jnUx2g1gsvwWIgyJgwBomggGqxKxx44qyfzSkJu3CuwFxrrfMGWgPvZvXYHrEGvQT8rf cf9dKkZXR9URjwnmrOwIw+GW83p3/e4YmWliHwl6CcM6hZCLj7gwdyGL4X1vN7P7tHEj HcnsXQIJrPmjUBoRl2eZMDPVDdqy3nDKMI9jVde37V99dPR++OHIr4L0vY/QuIhr+wwJ 2dYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gBuwZiJ9BJDMY4BHAGpRW/Ll8SJFKvYBNDg389aCn34=; b=owfduA9MjpOL3Nspd9iKSH/Eu8xXUlrD5b+ZmgmH0lpHP9lOtetdYom/1avkgsOlF2 v47ZVrd8zhp3cZ8aJLWDmWABkZtXP+abJtkNxe6rnEcH9N9GtN/VzoHEO0y47tC7hvEQ 0K8tuzgZMsfb4rGyVqYGS37TpzPzSbjQ5NqtFJBtRkywEOIL1+uJqpwgR6ctagHWHRbF cOKAuxc1WqI56WFwJACeZjvJHLg3x81fMSsQKy7P/cIKG8wNlHnanURFiQ2rDDnInkhc ZOyel/vIEOeFpTzyQuD7ZwX69sUFkgCeMVuqanTzPbJfg+Avl8I4LJiVs05h9S5oJ1Om gDQw== X-Gm-Message-State: AOAM533ju4JufprZVfWk4QGSnDgYSEOMLskI7g2Yn2mk7ajYbp3d9+RG 16asYxDB6BDntI7OCNOZb1LpToctY8N9Qw== X-Google-Smtp-Source: ABdhPJwVFP+0l1r0qNje/Vv4aZQmgLh8b23Aq1v0JQixRSPkSdosceSO6PET6pieN6+mLG6TPEzXSw== X-Received: by 2002:a92:6902:: with SMTP id e2mr8172908ilc.199.1634583716126; Mon, 18 Oct 2021 12:01:56 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id a8sm6945151ilh.5.2021.10.18.12.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 12:01:54 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PULL v2 15/23] bsd-user/errno_defs.h: Add internal error numbers Date: Mon, 18 Oct 2021 13:01:07 -0600 Message-Id: <20211018190115.5365-16-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211018190115.5365-1-imp@bsdimp.com> References: <20211018190115.5365-1-imp@bsdimp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=2607:f8b0:4864:20::129; envelope-from=imp@bsdimp.com; helo=mail-il1-x129.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kyle Evans , Richard Henderson , Stacey Son , Laurent Vivier , Warner Losh Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Stacey Son To emulate signals and interrupted system calls, we need to have the same mechanisms we have in the kernel, including these errno values. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/errno_defs.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bsd-user/errno_defs.h b/bsd-user/errno_defs.h index 1efa502a12..832671354f 100644 --- a/bsd-user/errno_defs.h +++ b/bsd-user/errno_defs.h @@ -1,6 +1,3 @@ -/* $OpenBSD: errno.h,v 1.20 2007/09/03 14:37:52 millert Exp $ */ -/* $NetBSD: errno.h,v 1.10 1996/01/20 01:33:53 jtc Exp $ */ - /* * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -37,6 +34,9 @@ * @(#)errno.h 8.5 (Berkeley) 1/21/94 */ +#ifndef _ERRNO_DEFS_H_ +#define _ERRNO_DEFS_H_ + #define TARGET_EPERM 1 /* Operation not permitted */ #define TARGET_ENOENT 2 /* No such file or directory */ #define TARGET_ESRCH 3 /* No such process */ @@ -147,3 +147,10 @@ #define TARGET_EIDRM 89 /* Identifier removed */ #define TARGET_ENOMSG 90 /* No message of desired type */ #define TARGET_ELAST 90 /* Must be equal largest errno */ + +/* Internal errors: */ +#define TARGET_EJUSTRETURN 254 /* Just return without modifing regs */ +#define TARGET_ERESTART 255 /* Restart syscall */ +#define TARGET_ERESTARTSYS TARGET_ERESTART /* Linux compat */ + +#endif /* ! _ERRNO_DEFS_H_ */ -- 2.32.0