aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/mount.h
diff options
context:
space:
mode:
authorRyan Moeller <freqlabs@FreeBSD.org>2020-05-21 01:55:35 +0000
committerRyan Moeller <freqlabs@FreeBSD.org>2020-05-21 01:55:35 +0000
commit245bfd34da590e12884bd1a5677f3227a36d4bcf (patch)
treebd3f30b09ed71ce881641d920535207ad89d75dc /sys/sys/mount.h
parent49caa483b3fafffd9cf5197eb30e8bb235aa7410 (diff)
downloadsrc-245bfd34da590e12884bd1a5677f3227a36d4bcf.tar.gz
src-245bfd34da590e12884bd1a5677f3227a36d4bcf.zip
Deduplicate fsid comparisons
Comparing fsid_t objects requires internal knowledge of the fsid structure and yet this is duplicated across a number of places in the code. Simplify by creating a fsidcmp function (macro). Reviewed by: mjg, rmacklem Approved by: mav (mentor) MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D24749
Notes
Notes: svn path=/head/; revision=361313
Diffstat (limited to 'sys/sys/mount.h')
-rw-r--r--sys/sys/mount.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 1941f2da2f09..00040932e7a3 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -52,6 +52,8 @@
typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */
+#define fsidcmp(a, b) memcmp((a), (b), sizeof(fsid_t))
+
/*
* File identifier.
* These are unique per filesystem on a single machine.