summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2010-03-07 16:45:18 +0000
committerbz <bz@FreeBSD.org>2010-03-07 16:45:18 +0000
commit2ef52c99e00a8eb2222938bb3e1a6c53c9285dd7 (patch)
tree6540381f262ea9b6d708ed9b6b811eaf0a2513ae /sbin
parent721ece0e76bec904018b373a4c335a5db65474cf (diff)
downloadFreeBSD-src-2ef52c99e00a8eb2222938bb3e1a6c53c9285dd7.zip
FreeBSD-src-2ef52c99e00a8eb2222938bb3e1a6c53c9285dd7.tar.gz
As statfs.f_flags are uint64_t the local variables should be as well.
We'll start noticing this with the next flag introduced as the lower 32bit are all used. As this is old code we might need to do a full tree sweep one day, unless changing our strategy to use a different `API' for getting/setting flags along with the rest of the statfs data. While here compare to 0 explicitly [1]. Suggested by: kib [1] Reviewed by: kib MFC after: 5 days
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount/mount.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 907f754..b39a7d1 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -91,7 +91,7 @@ char *flags2opts(int);
/* Map from mount options to printable formats. */
static struct opt {
- int o_opt;
+ uint64_t o_opt;
const char *o_name;
} optnames[] = {
{ MNT_ASYNC, "asynchronous" },
@@ -612,7 +612,7 @@ mountfs(const char *vfstype, const char *spec, const char *name, int flags,
void
prmount(struct statfs *sfp)
{
- int flags;
+ uint64_t flags;
unsigned int i;
struct opt *o;
struct passwd *pw;
@@ -621,7 +621,7 @@ prmount(struct statfs *sfp)
sfp->f_fstypename);
flags = sfp->f_flags & MNT_VISFLAGMASK;
- for (o = optnames; flags && o->o_opt; o++)
+ for (o = optnames; flags != 0 && o->o_opt != 0; o++)
if (flags & o->o_opt) {
(void)printf(", %s", o->o_name);
flags &= ~o->o_opt;
OpenPOWER on IntegriCloud