Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4044700ybc; Tue, 26 Nov 2019 02:55:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwYmN+PyQF10/DfHXyZu1NkV/6iints01AUgVOo7eP9ZZkMH1ci57AsCSaed0jqQnVOUFlw X-Received: by 2002:a50:9b1a:: with SMTP id o26mr24096113edi.208.1574765721636; Tue, 26 Nov 2019 02:55:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574765721; cv=none; d=google.com; s=arc-20160816; b=ooM9pdPodIFn2ShCsTu0IC/58CyXMYKwoodsCbKmg1Q4dxUmTPuGeG0LmSgA0bWVGs AojNoAzWJRmQOkAuuAwsLDwge5a1pbosccwdyV5V4v1Hgp206DiAdI6PBiFr9FHC0g6C tzLeL3xXKaASleJbsQ23ydiYXezz62CaohCjzMf88JzB46YhqbyqGt1vxtS956uxjl1A fOKpMQcPstdGvcwQclNMZRG+5w91+ePLly4IlMK8WPlMwqpU5h4DQWAe8sammJSR2a5r Uo4eQtjSeIqcovp0PDc6h6e75pR1/eMm7AgifLa/HpWD3DWUb5dgjS07Wi72ZihQ+xdC HR3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature; bh=RnmbUDDUqVr+GtJqX6llAqX+JxCSlgtk8y8KwLMGH8c=; b=0hzP9F2wHptDZ4YenADY6ilPrZ6w5iwEcR27fLlyxSad5CSWBOr8IQClIJIzuHYt/U 6N8snS+TGd9rpzjQcE+GZtZm45vwJucDIASVbqAuQE6+F5lj+1gjA41tCOkH9OZ3r5Rt nF7mdsX7RCzFka0yeIsu7t6qivgYVwrhM0b+baNX+hmZdBN6EaGxJsVpJcg9DGvi9+or qGP7C3qIPrUPvizrhFPhei7EAvTV3XwGA8+hFpRSa6xWAeCGOF6WL0t0pJY6SvNBdRwD xUyztvFBixD9w3Hp+siJK9wyk0beDiJuusE5ah2yYsWXALz1JC3MhNaBGayCSijwmsxf 4ssQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W5Y4mlNZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rs25si7068535ejb.85.2019.11.26.02.54.58; Tue, 26 Nov 2019 02:55:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W5Y4mlNZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727927AbfKZKxS (ORCPT + 99 others); Tue, 26 Nov 2019 05:53:18 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:37781 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727918AbfKZKxR (ORCPT ); Tue, 26 Nov 2019 05:53:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574765596; 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=RnmbUDDUqVr+GtJqX6llAqX+JxCSlgtk8y8KwLMGH8c=; b=W5Y4mlNZVD5HAoPvFE61j/O2GzK3XAAd8QNq4Pn32zaSKV5061IssIgTHY87TnIKGl1aF7 itpt4Y35TN07a8wuESHCGZey63SWe5YKqbtVEerckq+o3J35zeNGEnk+7yarH6uMu+ECks zVBn2oxxos7Q0ov5NXoWVcx2uu3bZMs= 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-76-ialD43iuM-y2-Dbz_gkc_w-1; Tue, 26 Nov 2019 05:53:15 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 132A0800D41; Tue, 26 Nov 2019 10:53:14 +0000 (UTC) Received: from 10.255.255.10 (unknown [10.40.205.176]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92B4E600C6; Tue, 26 Nov 2019 10:53:12 +0000 (UTC) Date: Tue, 26 Nov 2019 11:53:09 +0100 From: Karel Zak To: David Howells Cc: Al Viro , "Michael Kerrisk (man-pages)" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [MANPAGE] fsopen.2, fsmount.2 Message-ID: <20191126105309.m4k2zpxgxq7tacy2@10.255.255.10> References: <10805.1570726908@warthog.procyon.org.uk> MIME-Version: 1.0 In-Reply-To: <10805.1570726908@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: ialD43iuM-y2-Dbz_gkc_w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 10, 2019 at 06:01:48PM +0100, David Howells wrote: > .SH EXAMPLES > To illustrate the process, here's an example whereby this can be used to = mount > an ext4 filesystem on /dev/sdb1 onto /mnt. > .PP > .in +4n > .nf > sfd =3D fsopen("ext4", FSOPEN_CLOEXEC); > fsconfig(sfd, FSCONFIG_SET_FLAG, "ro", NULL, 0); > fsconfig(sfd, FSCONFIG_SET_STRING, "source", "/dev/sdb1", 0); > fsconfig(sfd, FSCONFIG_SET_FLAG, "noatime", NULL, 0); > fsconfig(sfd, FSCONFIG_SET_FLAG, "acl", NULL, 0); > fsconfig(sfd, FSCONFIG_SET_FLAG, "user_attr", NULL, 0); > fsconfig(sfd, FSCONFIG_SET_FLAG, "iversion", NULL, 0); > fsconfig(sfd, FSCONFIG_CMD_CREATE, NULL, NULL, 0); > mfd =3D fsmount(sfd, FSMOUNT_CLOEXEC, MS_RELATIME); > move_mount(mfd, "", sfd, AT_FDCWD, "/mnt", MOVE_MOUNT_F_EMPTY_PATH); ^^^^^^^^^^^^ Seems too many arguments (file descriptors), probably should be: move_mount(mfd, "", AT_FDCWD, "/mnt", MOVE_MOUNT_F_EMPTY_PATH); ... > move_mount(mfd, "", sfd, AT_FDCWD, "/mnt", MOVE_MOUNT_F_EMPTY_PATH); Here too. Karel --=20 Karel Zak http://karelzak.blogspot.com