summaryrefslogtreecommitdiffstats
path: root/sys/compat/linprocfs
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-02-26 23:38:34 +0000
committerjulian <julian@FreeBSD.org>2002-02-26 23:38:34 +0000
commitd49d5fdd170722f3c914cce543f04d988fe2499c (patch)
treee4c4593fcd147f3c0ff778f1aaba94fa7e920aa4 /sys/compat/linprocfs
parent8449ab85ee8c9725e6d86f7ac5c4d72ff2fd090a (diff)
downloadFreeBSD-src-d49d5fdd170722f3c914cce543f04d988fe2499c.zip
FreeBSD-src-d49d5fdd170722f3c914cce543f04d988fe2499c.tar.gz
remove "discards qualifier" erro by not potentially writing to
a const *.
Diffstat (limited to 'sys/compat/linprocfs')
-rw-r--r--sys/compat/linprocfs/linprocfs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index ae21891..ee14f2b 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -339,15 +339,18 @@ linprocfs_domtab(PFS_FILL_ARGS)
{
struct nameidata nd;
struct mount *mp;
- char *lep, *flep, *mntto, *mntfrom, *fstype;
+ const char *lep;
+ char *dlep, *flep, *mntto, *mntfrom, *fstype;
size_t lep_len;
int error;
/* resolve symlinks etc. in the emulation tree prefix */
NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td);
flep = NULL;
- if (namei(&nd) != 0 || vn_fullpath(td, nd.ni_vp, &lep, &flep) == -1)
+ if (namei(&nd) != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) == -1)
lep = linux_emul_path;
+ else
+ lep = dlep;
lep_len = strlen(lep);
mtx_lock(&mountlist_mtx);
OpenPOWER on IntegriCloud