From nobody Sun Feb 8 20:12:51 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1655747483; cv=none; d=zohomail.com; s=zohoarc; b=L8ZbO7eTXe0zPO5xu0b0hFWzkWWfS8zra+sY0TWuHoA7he6bpzLO+NiGPpFa7ICxT+l6Pd8CbQGksW2R5DNeb//N1Qp6+yMEVMQ3wyoknc5gJfyO2OjOmmpvfZzIuG9dxSXiGQEDxb12+mdnVxwjV81XP0NlPMnf2Tphguv9axI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655747483; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LLLWy6je7ZpzT8Wv1poVhDNL/22MkEnIbTh/HAesy/U=; b=jir0mwUqVaepeYGuIcImIUQ78jsvqBHJQ7v+cbgYo4bljIXDvL+4qdydtZt8DbOkHjTV89kqUSGW9TVoLCZRjGmmTGTp1Q0HBASNqqCfT1tCxEK0LNnEjHeMsp8pvp7ReH5kMWdKWOLZ/BxJMcSgsmPhlD5UVBmDXa5q+sd/ECo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1655747483066572.8343276913114; Mon, 20 Jun 2022 10:51:23 -0700 (PDT) Received: from localhost ([::1]:37454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3LYX-0001uA-V9 for importer@patchew.org; Mon, 20 Jun 2022 13:51:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3LPq-0005Z2-78 for qemu-devel@nongnu.org; Mon, 20 Jun 2022 13:42:22 -0400 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:35463) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3LPo-000834-N2 for qemu-devel@nongnu.org; Mon, 20 Jun 2022 13:42:21 -0400 Received: by mail-io1-xd2b.google.com with SMTP id y79so11848064iof.2 for ; Mon, 20 Jun 2022 10:42:20 -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 k19-20020a02c773000000b00331e4e4fac9sm6202953jao.47.2022.06.20.10.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 10:42:18 -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=LLLWy6je7ZpzT8Wv1poVhDNL/22MkEnIbTh/HAesy/U=; b=Xtp0A2lHvtl9nfw0NVwFQTs1NeBfExbUc+S5V19D7DChpItHGPyJvafkjW8X9Dplut eTcT7hQWJQ2yO/r5Gkf/R62AljgD9yNtm9G2W45ipCpj1DhtoGKlC1dssvKcVEvF98oj nNeg6N2hKL74+1h3LmIfNGtqCfoH8rFzgvAltFeCjK9+An7Afecou6RwSMyQDLTfpohh M3Xc7ICIn2HtDdMDCTfBl74twR6srttrSeJ4rYeY30s/y8VXTvkIr+yycmvs2lJ/cHNF oafVQu5FFQkFXWSrqyJZUxOPR/2H+O954VyRji96qnp1q43ClT2I5ijl1KEZxNxxZCII 1UaQ== 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=LLLWy6je7ZpzT8Wv1poVhDNL/22MkEnIbTh/HAesy/U=; b=F2FxAef5HC/1vrBGqHhkpuLDElLE81WKqR6+AgYykeMplB11d11lxuT1edG5+9hb0s unMGrqG3imU92Q0DSndjBE1LaGB0TgkUs4wTNp8Nab6luoZDoiyd8PH1BkTo35ye90/h SFigd4b6fmFjdt05miJIFAI69yc5LtL2obNRWrhg5GjBLLplipt/ih5WGWhLFMPIe89S aHIGcDBrKlie+mM+gcSQwGp9nO2xQAu7nAbmVVqX5Xs1bp6kzTNr1vt40lC4Kvs0Q6lu hlEnTnc044TbwhFwjBlJSH5OuXyZJN+Ik+7Ng9COXaxE7dy9pjIJfzPuAThp72hT5M3F Pbng== X-Gm-Message-State: AJIora+B1vPHJyf0ZaDe5AzRJPjwRZiQNhf0LVZRqil2wKC80u8cpwwk rmRyRqrfXnvw2eJ3c+1NtIvKRedgcS7btQ== X-Google-Smtp-Source: AGRyM1vYo1/j1NowR73lSNg/e/aO1+W21rWrbtSvM9OGFlDMYCFt7ShdDxWvMDxdurcD3apepepURg== X-Received: by 2002:a05:6602:148d:b0:66a:308a:d169 with SMTP id a13-20020a056602148d00b0066a308ad169mr12374922iow.152.1655746939365; Mon, 20 Jun 2022 10:42:19 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Cc: Warner Losh , Kyle Evans , Stacey Son Subject: [PATCH 10/10] bsd-user: Implement undelete Date: Mon, 20 Jun 2022 11:42:20 -0600 Message-Id: <20220620174220.22179-11-imp@bsdimp.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220620174220.22179-1-imp@bsdimp.com> References: <20220620174220.22179-1-imp@bsdimp.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::d2b; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2b.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @bsdimp-com.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1655747485075100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 13 +++++++++++++ bsd-user/freebsd/os-syscall.c | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index 79eb5a73a9b..94e756ae550 100644 --- a/bsd-user/bsd-file.h +++ b/bsd-user/bsd-file.h @@ -939,4 +939,17 @@ static abi_long do_bsd_fpathconf(abi_long arg1, abi_lo= ng arg2) return get_errno(fpathconf(arg1, arg2)); } =20 +/* undelete(2) */ +static abi_long do_bsd_undelete(abi_long arg1) +{ + abi_long ret; + void *p; + + LOCK_PATH(p, arg1); + ret =3D get_errno(undelete(p)); /* XXX path(p)? */ + UNLOCK_PATH(p, arg1); + + return ret; +} + #endif /* BSD_FILE_H */ diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index ee08b74bdd5..7d791aeb91b 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -489,6 +489,10 @@ static abi_long freebsd_syscall(void *cpu_env, int num= , abi_long arg1, ret =3D do_bsd_fpathconf(arg1, arg2); break; =20 + case TARGET_FREEBSD_NR_undelete: /* undelete(2) */ + ret =3D do_bsd_undelete(arg1); + break; + default: qemu_log_mask(LOG_UNIMP, "Unsupported syscall: %d\n", num); ret =3D -TARGET_ENOSYS; --=20 2.33.1