summaryrefslogtreecommitdiff
path: root/sbin/sysctl
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2018-09-29 04:29:49 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2018-09-29 04:29:49 +0000
commit691b70b45c19b10754cea14912bb54a12fd5d359 (patch)
tree1eef592fd5c723db3f552f3badd2e61409fb62c8 /sbin/sysctl
parentf4a74d27e1515a35cae90566c2493e16e217b453 (diff)
Use atomic operations to update vfc_refcount. Change the field's type
to unsigned int. OK deraadt@
Diffstat (limited to 'sbin/sysctl')
-rw-r--r--sbin/sysctl/sysctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index b2c64d41a32..9f0255e2c77 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.236 2018/09/22 02:20:44 visa Exp $ */
+/* $OpenBSD: sysctl.c,v 1.237 2018/09/29 04:29:48 visa Exp $ */
/* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */
/*
@@ -1293,11 +1293,11 @@ sysctl_vfsgen(char *string, char **bufpp, int mib[], int flags, int *typep)
if (flags == 0 && vfc.vfc_refcount == 0)
return -1;
if (!nflag)
- fprintf(stdout, "%s has %d mounted instance%s\n",
+ fprintf(stdout, "%s has %u mounted instance%s\n",
string, vfc.vfc_refcount,
vfc.vfc_refcount != 1 ? "s" : "");
else
- fprintf(stdout, "%d\n", vfc.vfc_refcount);
+ fprintf(stdout, "%u\n", vfc.vfc_refcount);
return -1;
}