From ab0a2a6afa22a4e6140e075b488b3e424898976d Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sun, 14 Nov 2010 18:31:33 +0100 Subject: [PATCH] identities: add dect_ari_cmp() Already contained in the header files, but never implemented. Signed-off-by: Patrick McHardy --- include/dect/libdect.h | 1 - src/identities.c | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/dect/libdect.h b/include/dect/libdect.h index 771d0f1..2e797ab 100644 --- a/include/dect/libdect.h +++ b/include/dect/libdect.h @@ -145,7 +145,6 @@ struct dect_ops { extern struct dect_handle *dect_open_handle(struct dect_ops *ops, const char *cluster); extern void dect_close_handle(struct dect_handle *dh); - extern void *dect_handle_priv(struct dect_handle *dh); extern void dect_pp_set_ipui(struct dect_handle *dh, diff --git a/src/identities.c b/src/identities.c index 33e4ff8..3dae8b5 100644 --- a/src/identities.c +++ b/src/identities.c @@ -122,6 +122,12 @@ uint64_t dect_build_ari(const struct dect_ari *ari) return a; } +bool dect_ari_cmp(const struct dect_ari *ari1, const struct dect_ari *ari2) +{ + return memcmp(ari1, ari2, sizeof(*ari1)); +} +EXPORT_SYMBOL(dect_ari_cmp); + static void dect_dump_ipei(const struct dect_ipei *ipei) { sfmt_debug("\tEMC: %.4x\n", ipei->emc);