[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.1.10.1002081131170.26981@be10.lrz>
Date: Mon, 8 Feb 2010 11:37:37 +0100 (CET)
From: Bodo Eggert <7eggert@....de>
To: Miklos Szeredi <miklos@...redi.hu>
cc: 7eggert@....de, viro@...IV.linux.org.uk,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
eugene@...hat.com, mtk.manpages@...il.com
Subject: Re: [RFC PATCH] vfs: add MNT_NOFOLLOW flag to umount(2)
On Fri, 5 Feb 2010, Miklos Szeredi wrote:
> On Thu, 04 Feb 2010, Bodo Eggert wrote:
>> Miklos Szeredi <miklos@...redi.hu> wrote:
>>
>>> Additionally, return -EINVAL if an unknown flag is encountered. This
>>> makes it possible for the caller to determine if a flag is supported
>>> or not (at least on kernels with this patch).
>>
>> There should be a guaranteed-to-be-invalid flag or flag-combination in
>> order to safely detect this feature.
>
> It's difficult though, because the app would have to make sure the
> detection itself would reliably fail, and with a different error.
>
> Simply checking the kernel version might be easier.
Yes, that's exactly what I intend to make possible:
| ret = umount("/tmp/mkstmp", UMOUNT_IMPOSSIBLE_FLAG);
| if (ret != -1 || errno != -EINVAL)
| goto extended_mount_flags_are_not_supported;
Checking the kernel version is a bad idea, because the application might
be portable, or features might be backported. ΒΆΒΆ
Powered by blists - more mailing lists