[systemd-devel] [PATCH] path-util: Fix path_is_mount_point for files

Martin Pitt martin.pitt at ubuntu.com
Fri May 29 02:47:47 PDT 2015


Lennart Poettering [2015-05-29 11:33 +0200]:
> > Exactly, that's why I called it "parent"; but I'm not fussed about the
> > name, "dir" or "containing_dir" would work as well. I'd just not call
> > it "filename" as that would be confusing -- this is *not* the file
> > name of fd, but the directory it lives in (i. e. fd's "parent" if you
> > will).
> 
> Now even more confused.
> [...]
> I say: the fd parameter should refer to the directory, and the string
> parameter to the file name in that directory.

Aah! I modeled it after what fd_is_mount_point() currently uses, where
the fd really *is* the fd to the actual file, *not* to the directory.
But I understand now that you want to change that, and what you mean
by "make it work like openat()".

Right, all clear now. The only consumer of this is rm_rf(), it's
simple enough to adjust to passing file name and parent dir fd instead
of file fd.

Yes, that will make the whole thing a lot cleaner.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


More information about the systemd-devel mailing list