From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web09.4154.1608156126305328871 for ; Wed, 16 Dec 2020 14:02:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=N3hAPPW+; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608156125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SVuCTIHjfX3yaFb+MUJ3II5DSa0bYJ4n17T2asiO4fc=; b=N3hAPPW+ZqXUMxbPHnA8s9Gv4drquIWqZMyVSKpO2NMfqDRcykBxhDzmK0FZPTpxvw9BHr cyOJ3ern2WkdNKkfb12ggi/uqzbp5Vh5vl3yV4gCC10/GP22OPuv0/Lc0HlQ0Wvl4cHy8g V+glu3RlWte9MaUDJOF3s16H44ZvIfo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-549-jb_JhaGkMUWli4Cv6CVgJQ-1; Wed, 16 Dec 2020 17:02:03 -0500 X-MC-Unique: jb_JhaGkMUWli4Cv6CVgJQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96E571005504; Wed, 16 Dec 2020 22:02:02 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-152.ams2.redhat.com [10.36.114.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id C127B5D71B; Wed, 16 Dec 2020 22:01:57 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io, virtio-fs@redhat.com, lersek@redhat.com Cc: Ard Biesheuvel , Jordan Justen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [edk2 PATCH 24/48] OvmfPkg/VirtioFsDxe: add a shared wrapper for FUSE_UNLINK / FUSE_RMDIR Date: Wed, 16 Dec 2020 22:11:01 +0100 Message-Id: <20201216211125.19496-25-lersek@redhat.com> In-Reply-To: <20201216211125.19496-1-lersek@redhat.com> References: <20201216211125.19496-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 VGhlIEZVU0VfVU5MSU5LIGFuZCBGVVNFX1JNRElSIGNvbW1hbmRzIG9ubHkgZGlmZmVyIGluIHRo ZSBvcGNvZGUuIEFkZCBhCmNvbW1vbiBmdW5jdGlvbiBmb3Igd3JhcHBpbmcgYm90aC4KCkNjOiBB cmQgQmllc2hldXZlbCA8YXJkLmJpZXNoZXV2ZWxAYXJtLmNvbT4KQ2M6IEpvcmRhbiBKdXN0ZW4g PGpvcmRhbi5sLmp1c3RlbkBpbnRlbC5jb20+CkNjOiBQaGlsaXBwZSBNYXRoaWV1LURhdWTDqSA8 cGhpbG1kQHJlZGhhdC5jb20+ClJlZjogaHR0cHM6Ly9idWd6aWxsYS50aWFub2NvcmUub3JnL3No b3dfYnVnLmNnaT9pZD0zMDk3ClNpZ25lZC1vZmYtYnk6IExhc3psbyBFcnNlayA8bGVyc2VrQHJl ZGhhdC5jb20+Ci0tLQogT3ZtZlBrZy9JbmNsdWRlL0luZHVzdHJ5U3RhbmRhcmQvVmlydGlvRnMu aCB8ICAgMiArCiBPdm1mUGtnL1ZpcnRp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