Module Name: src
Committed By: christos
Date: Mon Jan 15 14:38:06 UTC 2018
Modified Files:
src/usr.sbin/autofs: automount.c
Log Message:
avoid passing literal string to unconst.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/autofs/automount.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/autofs/automount.c
diff -u src/usr.sbin/autofs/automount.c:1.2 src/usr.sbin/autofs/automount.c:1.3
--- src/usr.sbin/autofs/automount.c:1.2 Sun Jan 14 19:46:16 2018
+++ src/usr.sbin/autofs/automount.c Mon Jan 15 09:38:06 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: automount.c,v 1.2 2018/01/15 00:46:16 christos Exp $ */
+/* $NetBSD: automount.c,v 1.3 2018/01/15 14:38:06 christos Exp $ */
/*-
* Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: automount.c,v 1.2 2018/01/15 00:46:16 christos Exp $");
+__RCSID("$NetBSD: automount.c,v 1.3 2018/01/15 14:38:06 christos Exp $");
#include <sys/types.h>
#include <sys/mount.h>
@@ -155,6 +155,7 @@ mount_unmount(struct node *root)
struct statvfs *mntbuf;
struct node *n, *n2;
int i, nitems;
+ static char rootdir[] = "/";
nitems = getmntinfo(&mntbuf, MNT_WAIT);
if (nitems <= 0)
@@ -192,7 +193,7 @@ mount_unmount(struct node *root)
TAILQ_FOREACH(n2, &n->n_children, n_next) {
mount_if_not_already(n2, n->n_map, n->n_options,
- "/", mntbuf, nitems);
+ rootdir, mntbuf, nitems);
}
}
}