Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1631560
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Revised statx(2) man page for review [and AT_EMPTY_PATH question] |
| Date | 2017-04-26 18:00 +0200 |
| Message-ID | <tAxwe-4hS-13@gated-at.bofh.it> (permalink) |
| References | <tA6FI-3Yq-19@gated-at.bofh.it> <tAtsB-1D1-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Apr 26, 2017 at 12:35:08PM +0100, David Howells wrote: > AT_EMPTY_PATH wasn't there back in 2010. I could eliminate the: > > statx(fd, NULL, 0, ...); > > option in favour of: > > statx(fd, "", AT_EMPTY_PATH, ...); > > Any thoughts either way, Al? > > It would seem that AT_EMPTY_PATH should be redundant, though, since you can > just set the pathname pointer to NULL. NULL pathname pointer means an error for a lot of existing syscalls, so if you want to turn them into wrappers for ...at() ones at libc level, you'd need to do special-casing of NULL both kernel-side and in libc wrappers. Requiring "" + AT_EMPTY_PATH means a single dereference of userland pointer. OTOH, that's not a terrible burden...
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Revised statx(2) man page for review "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-04-25 13:20 +0200
Re: Revised statx(2) man page for review Silvan Jegen <s.jegen@gmail.com> - 2017-04-25 21:00 +0200
Re: Revised statx(2) man page for review "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-04-25 21:50 +0200
Re: Revised statx(2) man page for review "Dmitry V. Levin" <ldv@altlinux.org> - 2017-04-25 22:10 +0200
Re: Revised statx(2) man page for review "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-04-26 07:50 +0200
Re: Revised statx(2) man page for review "G. Branden Robinson" <g.branden.robinson@gmail.com> - 2017-04-26 12:50 +0200
Re: Revised statx(2) man page for review [and AT_EMPTY_PATH question] David Howells <dhowells@redhat.com> - 2017-04-26 13:40 +0200
Re: Revised statx(2) man page for review [and AT_EMPTY_PATH question] "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-04-26 14:20 +0200
Re: Revised statx(2) man page for review [and AT_EMPTY_PATH question] David Howells <dhowells@redhat.com> - 2017-04-26 17:30 +0200
Re: Revised statx(2) man page for review [and AT_EMPTY_PATH question] "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-04-26 21:10 +0200
Re: Revised statx(2) man page for review [and AT_EMPTY_PATH question] Al Viro <viro@ZenIV.linux.org.uk> - 2017-04-26 18:00 +0200
csiph-web