From e6f0fb7b28884373669f58220481c2d3cd36ca62 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 24 Oct 2016 12:06:47 +0300 Subject: [PATCH] Eliminate headerVerifyInfo() from API + ABI Another internal piece that should've never been exported in the first place, lets do so now since we're breaking the ABI anyway... Oh and lets make headerVerifyRegion() properly internal while we're at it. --- lib/header.h | 11 ----------- lib/header_internal.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/header.h b/lib/header.h index 85ba754ea..8cef87838 100644 --- a/lib/header.h +++ b/lib/header.h @@ -62,17 +62,6 @@ Header headerLink(Header h); */ unsigned int headerSizeof(Header h, int magicp); -/** \ingroup header - * Perform simple sanity and range checks on header tag(s). - * @param il no. of tags in header - * @param dl no. of bytes in header data. - * @param pev 1st element in tag array, big-endian - * @param iv failing (or last) tag element, host-endian - * @param negate negative offset expected? - * @return -1 on success, otherwise failing tag element index - */ -int headerVerifyInfo(int il, int dl, const void * pev, void * iv, int negate); - /** \ingroup header * Convert header to on-disk representation. * @deprecated Use headerExport() instead diff --git a/lib/header_internal.h b/lib/header_internal.h index 5ce1249ab..83b4a71fe 100644 --- a/lib/header_internal.h +++ b/lib/header_internal.h @@ -64,11 +64,24 @@ static inline void ei2h(entryInfo pe, entryInfo info) info->count = ntohl(pe->count); } +RPM_GNUC_INTERNAL rpmRC headerVerifyRegion(rpmTagVal regionTag, int il, int dl, entryInfo pe, unsigned char *dataStart, int exact_size, int *ril, int *rdl, char **buf); +/** \ingroup header + * Perform simple sanity and range checks on header tag(s). + * @param il no. of tags in header + * @param dl no. of bytes in header data. + * @param pev 1st element in tag array, big-endian + * @param iv failing (or last) tag element, host-endian + * @param negate negative offset expected? + * @return -1 on success, otherwise failing tag element index + */ +RPM_GNUC_INTERNAL +int headerVerifyInfo(int il, int dl, const void * pev, void * iv, int negate); + /** \ingroup header * Set header instance (rpmdb record number)