aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-08 15:03:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-08 15:03:57 +0100
commit07141f919dc8582460f984ed1d2fb73e05f82ef3 (patch)
tree3f3376d6ee51330098b174fe503598ea92d27528
parent8721298b21f2d645f35906141dd66bee3271d2ed (diff)
downloadpseudo-07141f919dc8582460f984ed1d2fb73e05f82ef3.tar.gz
pseudo-07141f919dc8582460f984ed1d2fb73e05f82ef3.tar.bz2
pseudo-07141f919dc8582460f984ed1d2fb73e05f82ef3.zip
ports/linux/statx: Fix path name mapping issue
There is magic in the posts where specific variable names have specific magic. For that magic to work, "path" needs to be used not "pathname" as is currently there. Fix this, which fixes path issues on systems using statx (Ubuntu 20.04 in particular). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--ports/linux/statx/guts/statx.c10
-rw-r--r--ports/linux/statx/wrapfuncs.in2
2 files changed, 6 insertions, 6 deletions
diff --git a/ports/linux/statx/guts/statx.c b/ports/linux/statx/guts/statx.c
index 96f3e35..42aebe5 100644
--- a/ports/linux/statx/guts/statx.c
+++ b/ports/linux/statx/guts/statx.c
@@ -5,14 +5,14 @@
* SPDX-License-Identifier: LGPL-2.1-only
*
* int
- * statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf) {
+ * statx(int dirfd, const char *path, int flags, unsigned int mask, struct statx *statxbuf) {
* int rc = -1;
*/
pseudo_msg_t *msg;
PSEUDO_STATBUF buf;
int save_errno;
- rc = real_statx(dirfd, pathname, flags, mask, statxbuf);
+ rc = real_statx(dirfd, path, flags, mask, statxbuf);
save_errno = errno;
if (rc == -1) {
return rc;
@@ -25,16 +25,16 @@
buf.st_mode = statxbuf->stx_mode;
buf.st_rdev = makedev(statxbuf->stx_rdev_major, statxbuf->stx_rdev_minor);
buf.st_nlink = statxbuf->stx_nlink;
- msg = pseudo_client_op(OP_STAT, 0, -1, dirfd, pathname, &buf);
+ msg = pseudo_client_op(OP_STAT, 0, -1, dirfd, path, &buf);
if (msg && msg->result == RESULT_SUCCEED) {
- pseudo_debug(PDBGF_FILE, "statx(path %s), flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid);
+ pseudo_debug(PDBGF_FILE, "statx(path %s), flags %o, stat rc %d, stat uid %o\n", path, flags, rc, statxbuf->stx_uid);
statxbuf->stx_uid = msg->uid;
statxbuf->stx_gid = msg->gid;
statxbuf->stx_mode = msg->mode;
statxbuf->stx_rdev_major = major(msg->rdev);
statxbuf->stx_rdev_minor = minor(msg->rdev);
} else {
- pseudo_debug(PDBGF_FILE, "statx(path %s) failed, flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid);
+ pseudo_debug(PDBGF_FILE, "statx(path %s) failed, flags %o, stat rc %d, stat uid %o\n", path, flags, rc, statxbuf->stx_uid);
}
errno = save_errno;
/* return rc;
diff --git a/ports/linux/statx/wrapfuncs.in b/ports/linux/statx/wrapfuncs.in
index c9cd4c3..168234f 100644
--- a/ports/linux/statx/wrapfuncs.in
+++ b/ports/linux/statx/wrapfuncs.in
@@ -1 +1 @@
-int statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf);
+int statx(int dirfd, const char *path, int flags, unsigned int mask, struct statx *statxbuf);