From 84f1d7f21dc4195d7c8476988c532d62b7bf65c5 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Thu, 6 Feb 2014 17:01:19 -0500 Subject: [PATCH] FBSD: Switch the dummy 'data' for mount(2) The mount(2) API takes a void*, but 'rn' is const char*, which is const-incorrect. Our vfs_cmount implementation ignores the 'data' parameter, but upstream's kernel mount(2) implementation did have a NULL check until r158611 (in the 6.1 or 7.0 timeframe), so leave that comment for now. Arguably we should be using nmount(2) instead of mount(2) anyway, but leave that for a separate patch. Reviewed-on: http://gerrit.openafs.org/10821 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 53d7145416c0a6bafa7ecccd113178fc4af04f8f) Change-Id: Id8ab9ec946a8eee7c73cf234f35e7d12a65f6d84 Reviewed-on: http://gerrit.openafs.org/11776 Reviewed-by: Jeffrey Altman Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand --- src/afsd/afsd_kernel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afsd/afsd_kernel.c b/src/afsd/afsd_kernel.c index d93dc2a4f1..dbf07f46e1 100644 --- a/src/afsd/afsd_kernel.c +++ b/src/afsd/afsd_kernel.c @@ -510,8 +510,8 @@ afsd_mount_afs(const char *rn, const char *cacheMountDir) printf("%s: Mounting the AFS root on '%s', flags: %d.\n", rn, cacheMountDir, mountFlags); #if defined(AFS_FBSD60_ENV) - /* data must be non-NULL but is otherwise ignored */ - if ((mount(MOUNT_AFS, cacheMountDir, mountFlags, rn)) < 0) { + /* data must be non-const non-NULL but is otherwise ignored */ + if ((mount(MOUNT_AFS, cacheMountDir, mountFlags, &mountFlags)) < 0) { #elif defined(AFS_FBSD_ENV) if ((mount("AFS", cacheMountDir, mountFlags, (caddr_t) 0)) < 0) { #elif defined(AFS_AIX_ENV)