diff --git a/utils/uds/Makefile b/utils/uds/Makefile index 0963469a..7b86acff 100644 --- a/utils/uds/Makefile +++ b/utils/uds/Makefile @@ -22,7 +22,7 @@ # UDS interfaces exported from libuds.so. DISTRIBUTION_VERSION is the long # version name used in distribution builds. We extract these values from the # traditional location. -UDS_VERSION = 6.1.1.6 +UDS_VERSION = 6.1.1.7 BUILD_VERSION = $(UDS_VERSION) DISTRO_CODENAME := $(shell lsb_release -s -c) diff --git a/utils/uds/componentPortal.h b/utils/uds/componentPortal.h deleted file mode 100644 index 299c3518..00000000 --- a/utils/uds/componentPortal.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - * - * $Id: //eng/uds-releases/flanders/src/uds/componentPortal.h#2 $ - */ - -#ifndef COMPONENT_PORTAL_H -#define COMPONENT_PORTAL_H - -#include "bufferedReader.h" -#include "bufferedWriter.h" - -typedef struct componentPortal ComponentPortal; -typedef struct indexComponent IndexComponent; - -/** - * Return the index component associated with this component portal. - * - * @param portal The component portal. - * - * @return The index component. - **/ -static IndexComponent *indexComponentForPortal(ComponentPortal *portal); - -/** - * Count the number of parts for this portal. - * - * @param [in] portal The component portal. - * @param [out] parts The number of parts. - * - * @return UDS_SUCCESS or an error code. - **/ -static int countComponents(ComponentPortal *portal, unsigned int *parts) - __attribute__((warn_unused_result)); - -/** - * Get the size of the saved component part image. - * - * @param [in] portal The component portal. - * @param [in] part The component ordinal number. - * @param [out] size The size of the component image. - * - * @return UDS_SUCCESS or an error code. - * - * @note This is only supported by some types of portals and only if the - * component was previously saved. - **/ -static int getComponentSize(ComponentPortal *portal, - unsigned int part, - off_t *size) - __attribute__((warn_unused_result)); - -/** - * Get the limit of the component's storage area. May be unlimited. - * - * @param [in] portal The component portal. - * @param [in] part The component ordinal number. - * @param [out] limit The space available to store the component. - * - * @return UDS_SUCCESS or an error code. - * - * @note File-based portals have no limit. - **/ -static int getComponentLimit(ComponentPortal *portal, - unsigned int part, - off_t *limit) - __attribute__((warn_unused_result)); - -/** - * Return the IORegion for the specified component part. - * - * @param [in] portal The component portal. - * @param [in] part The component ordinal number. - * @param [out] regionPtr An IORegion for reading or writing - * the specified component instance. - * - * @return UDS_SUCCESS or an error code - * - * @note the region is managed by the component portal - **/ -static int getIORegion(ComponentPortal *portal, - unsigned int part, - IORegion **regionPtr) - __attribute__((warn_unused_result)); - -/** - * Get a buffered reader for the specified component part. - * - * @param [in] portal The component portal. - * @param [in] part The component ordinal number. - * @param [out] readerPtr Where to put the buffered reader. - * - * @return UDS_SUCCESS or an error code. - * - * @note the reader is managed by the component portal - **/ -static int getBufferedReader(ComponentPortal *portal, - unsigned int part, - BufferedReader **readerPtr) - __attribute__((warn_unused_result)); - -/** - * Get a buffered writer for the specified component part. - * - * @param [in] portal The component portal. - * @param [in] part The component ordinal number. - * @param [out] writerPtr Where to put the buffered reader. - * - * @return UDS_SUCCESS or an error code. - * - * @note the writer is managed by the component portal - **/ -static int getBufferedWriter(ComponentPortal *portal, - unsigned int part, - BufferedWriter **writerPtr) - __attribute__((warn_unused_result)); - -// Dull, boring implementations details below... - -#define COMPONENT_PORTAL_INLINE -#include "componentPortalInline.h" -#undef COMPONENT_PORTAL_INLINE - -#endif // COMPONENT_PORTAL_H diff --git a/utils/uds/componentPortalInline.h b/utils/uds/componentPortalInline.h deleted file mode 100644 index 627976ec..00000000 --- a/utils/uds/componentPortalInline.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - * - * $Id: //eng/uds-releases/flanders/src/uds/componentPortalInline.h#2 $ - */ - -#ifndef COMPONENT_PORTAL_INLINE_H -#define COMPONENT_PORTAL_INLINE_H - -#ifndef COMPONENT_PORTAL_INLINE -# error "Must be included by componentPortal.h" -#endif - -#include "compiler.h" - -typedef struct componentPortalOps { - int (*count) (ComponentPortal *, unsigned int *); - int (*getSize) (ComponentPortal *, unsigned int, off_t *); - int (*getLimit) (ComponentPortal *, unsigned int, off_t *); - int (*getRegion)(ComponentPortal *, unsigned int, IORegion **); - int (*getReader)(ComponentPortal *, unsigned int, BufferedReader **); - int (*getWriter)(ComponentPortal *, unsigned int, BufferedWriter **); -} ComponentPortalOps; - -struct componentPortal { - IndexComponent *component; - const ComponentPortalOps *ops; -}; - -/*****************************************************************************/ -static INLINE IndexComponent *indexComponentForPortal(ComponentPortal *portal) -{ - return portal->component; -} - -/*****************************************************************************/ -static INLINE int countComponents(ComponentPortal *portal, unsigned int *parts) -{ - return portal->ops->count(portal, parts); -} - -/*****************************************************************************/ -static INLINE int getComponentSize(ComponentPortal *portal, - unsigned int part, - off_t *size) -{ - return portal->ops->getSize(portal, part, size); -} - -/*****************************************************************************/ -static INLINE int getComponentLimit(ComponentPortal *portal, - unsigned int part, - off_t *size) -{ - return portal->ops->getLimit(portal, part, size); -} - -/*****************************************************************************/ -static INLINE int getIORegion(ComponentPortal *portal, - unsigned int part, - IORegion **regionPtr) -{ - return portal->ops->getRegion(portal, part, regionPtr); -} - -/*****************************************************************************/ -static INLINE int getBufferedReader(ComponentPortal *portal, - unsigned int part, - BufferedReader **readerPtr) -{ - return portal->ops->getReader(portal, part, readerPtr); -} - -/*****************************************************************************/ -static INLINE int getBufferedWriter(ComponentPortal *portal, - unsigned int part, - BufferedWriter **writerPtr) -{ - return portal->ops->getWriter(portal, part, writerPtr); -} - -#endif // COMPONENT_PORTAL_INLINE_H diff --git a/utils/uds/indexComponent.c b/utils/uds/indexComponent.c index 9064f562..f4000136 100644 --- a/utils/uds/indexComponent.c +++ b/utils/uds/indexComponent.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * - * $Id: //eng/uds-releases/flanders/src/uds/indexComponent.c#2 $ + * $Id: //eng/uds-releases/flanders/src/uds/indexComponent.c#3 $ */ #include "indexComponentInternal.h" @@ -95,11 +95,10 @@ void destroyReadPortal(ReadPortal *readPortal) } } -static const ComponentPortalOps *getReadPortalOps(void); - -int initReadPortal(ReadPortal *portal, - IndexComponent *component, - unsigned int readZones) +/*****************************************************************************/ +int initReadPortal(ReadPortal *portal, + IndexComponent *component, + unsigned int readZones) { int result = ALLOCATE(readZones, IORegion *, "read zone IO regions", &portal->regions); @@ -112,158 +111,57 @@ int initReadPortal(ReadPortal *portal, FREE(portal->regions); return result; } - + portal->component = component; portal->zones = readZones; - - portal->common = (ComponentPortal) { - .component = component, - .ops = getReadPortalOps(), - }; - return UDS_SUCCESS; } /*****************************************************************************/ -static INLINE ReadPortal *asReadPortal(ComponentPortal *portal) -{ - return container_of(portal, ReadPortal, common); -} - -/*****************************************************************************/ -static int rp_countComponents(ComponentPortal *portal, unsigned int *parts) +int getComponentSizeForPortal(ReadPortal *portal, + unsigned int part, + off_t *size) { - ReadPortal *rp = asReadPortal(portal); - - *parts = rp->zones; - return UDS_SUCCESS; -} - -/*****************************************************************************/ -static int rp_getComponentSize(ComponentPortal *portal, - unsigned int part, - off_t *size) -{ - ReadPortal *rp = asReadPortal(portal); - - if (part >= rp->zones) { + if (part >= portal->zones) { return logErrorWithStringError(UDS_INVALID_ARGUMENT, "%s: cannot access zone %u of %u", - __func__, part, rp->zones); + __func__, part, portal->zones); } - - if (rp->regions[part] == NULL) { - return logErrorWithStringError(UDS_UNEXPECTED_RESULT, - "%s: ioregion for zone %u not available", - __func__, part); - } - - return getRegionDataSize(rp->regions[part], size); -} - -/*****************************************************************************/ -static int rp_getComponentLimit(ComponentPortal *portal, - unsigned int part, - off_t *limit) -{ - ReadPortal *rp = asReadPortal(portal); - - if (part >= rp->zones) { - return logErrorWithStringError(UDS_INVALID_ARGUMENT, - "%s: cannot access zone %u of %u", - __func__, part, rp->zones); - } - - if (rp->regions[part] == NULL) { + if (portal->regions[part] == NULL) { return logErrorWithStringError(UDS_UNEXPECTED_RESULT, "%s: ioregion for zone %u not available", __func__, part); } - - return getRegionLimit(rp->regions[part], limit); + return getRegionDataSize(portal->regions[part], size); } /*****************************************************************************/ -static int rp_getIORegion(ComponentPortal *portal, - unsigned int part, - IORegion **regionPtr) -{ - ReadPortal *rp = asReadPortal(portal); - - if (part >= rp->zones) { - return logErrorWithStringError(UDS_INVALID_ARGUMENT, - "%s: cannot access zone %u of %u", - __func__, part, rp->zones); - } - - if (rp->regions[part] == NULL) { - return logErrorWithStringError(UDS_UNEXPECTED_RESULT, - "%s: ioregion for zone %u not available", - __func__, part); - } - - *regionPtr = rp->regions[part]; - return UDS_SUCCESS; -} - -/*****************************************************************************/ -static int rp_getBufferedReader(ComponentPortal *portal, - unsigned int part, - BufferedReader **readerPtr) +int getBufferedReaderForPortal(ReadPortal *portal, + unsigned int part, + BufferedReader **readerPtr) { - ReadPortal *rp = asReadPortal(portal); - - if (part >= rp->zones) { + if (part >= portal->zones) { return logErrorWithStringError(UDS_INVALID_ARGUMENT, "%s: cannot access zone %u of %u", - __func__, part, rp->zones); + __func__, part, portal->zones); } - - if (rp->readers[part] == NULL) { - if (rp->regions[part] == NULL) { + if (portal->readers[part] == NULL) { + if (portal->regions[part] == NULL) { return logErrorWithStringError(UDS_UNEXPECTED_RESULT, "%s: ioregion for zone %u not available", __func__, part); } - - int result = makeBufferedReader(rp->regions[part], &rp->readers[part]); + int result = makeBufferedReader(portal->regions[part], + &portal->readers[part]); if (result != UDS_SUCCESS) { return logErrorWithStringError(result, "%s: cannot make buffered reader " "for zone %u", __func__, part); } } - - *readerPtr = rp->readers[part]; + *readerPtr = portal->readers[part]; return UDS_SUCCESS; } -/*****************************************************************************/ -static int rp_getBufferedWriter(ComponentPortal *portal - __attribute__((unused)), - unsigned int part __attribute__((unused)), - BufferedWriter **writerPtr - __attribute__((unused))) -{ - return logErrorWithStringError(UDS_BAD_IO_DIRECTION, - "cannot make buffered writer from read zone"); -} - -/*****************************************************************************/ - -static const ComponentPortalOps readPortalOps = { - .count = rp_countComponents, - .getSize = rp_getComponentSize, - .getLimit = rp_getComponentLimit, - .getRegion = rp_getIORegion, - .getReader = rp_getBufferedReader, - .getWriter = rp_getBufferedWriter, -}; - -static const ComponentPortalOps *getReadPortalOps(void) -{ - return &readPortalOps; -} - /*****************************************************************************/ int readIndexComponent(IndexComponent *component) { @@ -272,9 +170,7 @@ int readIndexComponent(IndexComponent *component) if (result != UDS_SUCCESS) { return result; } - - result = (*component->info->loader)(&readPortal->common); - + result = (*component->info->loader)(readPortal); component->ops->freeReadPortal(readPortal); return result; } diff --git a/utils/uds/indexComponent.h b/utils/uds/indexComponent.h index cfb72c8c..05290aeb 100644 --- a/utils/uds/indexComponent.h +++ b/utils/uds/indexComponent.h @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * - * $Id: //eng/uds-releases/flanders/src/uds/indexComponent.h#2 $ + * $Id: //eng/uds-releases/flanders/src/uds/indexComponent.h#3 $ */ #ifndef INDEX_COMPONENT_H @@ -24,12 +24,12 @@ #include "common.h" +#include "bufferedReader.h" #include "bufferedWriter.h" #include "compiler.h" -#include "componentPortal.h" #include "regionIdentifiers.h" -// note 'typedef struct indexComponent IndexComponent' in componentPortal.h +typedef struct indexComponent IndexComponent; typedef enum completionStatus { CS_NOT_COMPLETED, // operation has not completed @@ -37,6 +37,13 @@ typedef enum completionStatus { CS_COMPLETED_PREVIOUSLY // operation completed previously } CompletionStatus; +typedef struct readPortal { + IndexComponent *component; + IORegion **regions; + BufferedReader **readers; + unsigned int zones; +} ReadPortal; + /** * Prototype for functions which can load an index component from its * saved state. @@ -45,7 +52,7 @@ typedef enum completionStatus { * specified component. * @return UDS_SUCCESS or an error code **/ -typedef int (*Loader)(ComponentPortal *portal); +typedef int (*Loader)(ReadPortal *portal); /** * Prototype for functions which can save an index component. @@ -128,17 +135,17 @@ static inline void *indexComponentContext(IndexComponent *component); /** * Return the index component name for this portal. **/ -static inline const char *componentNameForPortal(ComponentPortal *portal); +static inline const char *componentNameForPortal(ReadPortal *portal); /** * Return the index component data for this portal. **/ -static inline void *componentDataForPortal(ComponentPortal *portal); +static inline void *componentDataForPortal(ReadPortal *portal); /** * Return the index component context for this portal. **/ -static inline void *componentContextForPortal(ComponentPortal *portal); +static inline void *componentContextForPortal(ReadPortal *portal); /** * Determine whether this component may be skipped for a checkpoint. @@ -297,6 +304,53 @@ int abortIndexComponentIncrementalSave(IndexComponent *component) static inline int discardIndexComponent(IndexComponent *component) __attribute__((warn_unused_result)); +/** + * Count the number of parts for this portal. + * + * @param [in] portal The component portal. + * @param [out] parts The number of parts. + * + * @return UDS_SUCCESS or an error code. + **/ +__attribute__((warn_unused_result)) +static INLINE unsigned int countPartsForPortal(ReadPortal *portal) +{ + return portal->zones; +} + +/** + * Get the size of the saved component part image. + * + * @param [in] portal The component portal. + * @param [in] part The component ordinal number. + * @param [out] size The size of the component image. + * + * @return UDS_SUCCESS or an error code. + * + * @note This is only supported by some types of portals and only if the + * component was previously saved. + **/ +__attribute__((warn_unused_result)) +int getComponentSizeForPortal(ReadPortal *portal, + unsigned int part, + off_t *size); + +/** + * Get a buffered reader for the specified component part. + * + * @param [in] portal The component portal. + * @param [in] part The component ordinal number. + * @param [out] readerPtr Where to put the buffered reader. + * + * @return UDS_SUCCESS or an error code. + * + * @note the reader is managed by the component portal + **/ +__attribute__((warn_unused_result)) +int getBufferedReaderForPortal(ReadPortal *portal, + unsigned int part, + BufferedReader **readerPtr); + #define INDEX_COMPONENT_INLINE #include "indexComponentInline.h" #undef INDEX_COMPONENT_INLINE diff --git a/utils/uds/indexComponentInline.h b/utils/uds/indexComponentInline.h index 09e849e3..7cf09baa 100644 --- a/utils/uds/indexComponentInline.h +++ b/utils/uds/indexComponentInline.h @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * - * $Id: //eng/uds-releases/flanders/src/uds/indexComponentInline.h#2 $ + * $Id: //eng/uds-releases/flanders/src/uds/indexComponentInline.h#3 $ */ #ifndef INDEX_COMPONENT_INLINE_H @@ -28,7 +28,6 @@ #include "compiler.h" -typedef struct readPortal ReadPortal; typedef struct writeZone WriteZone; typedef struct indexComponentOps { @@ -84,21 +83,21 @@ static INLINE void *indexComponentContext(IndexComponent *component) } /*****************************************************************************/ -static INLINE const char *componentNameForPortal(ComponentPortal *portal) +static INLINE const char *componentNameForPortal(ReadPortal *portal) { - return indexComponentName(indexComponentForPortal(portal)); + return indexComponentName(portal->component); } /*****************************************************************************/ -static INLINE void *componentDataForPortal(ComponentPortal *portal) +static INLINE void *componentDataForPortal(ReadPortal *portal) { - return indexComponentData(indexComponentForPortal(portal)); + return indexComponentData(portal->component); } /*****************************************************************************/ -static INLINE void *componentContextForPortal(ComponentPortal *portal) +static INLINE void *componentContextForPortal(ReadPortal *portal) { - return indexComponentContext(indexComponentForPortal(portal)); + return indexComponentContext(portal->component); } /*****************************************************************************/ diff --git a/utils/uds/indexComponentInternal.h b/utils/uds/indexComponentInternal.h index dbfb5d1c..9a080a46 100644 --- a/utils/uds/indexComponentInternal.h +++ b/utils/uds/indexComponentInternal.h @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * - * $Id: //eng/uds-releases/flanders/src/uds/indexComponentInternal.h#2 $ + * $Id: //eng/uds-releases/flanders/src/uds/indexComponentInternal.h#3 $ */ #ifndef INDEX_COMPONENT_INTERNAL_H @@ -24,13 +24,6 @@ #include "indexComponent.h" -struct readPortal { - unsigned int zones; - ComponentPortal common; - IORegion **regions; - BufferedReader **readers; -}; - struct writeZone { IndexComponent *component; IncrementalWriterCommand phase; diff --git a/utils/uds/indexPageMap.c b/utils/uds/indexPageMap.c index 258c63d5..d71d8a58 100644 --- a/utils/uds/indexPageMap.c +++ b/utils/uds/indexPageMap.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * - * $Id: //eng/uds-releases/flanders/src/uds/indexPageMap.c#2 $ + * $Id: //eng/uds-releases/flanders/src/uds/indexPageMap.c#3 $ */ #include "indexPageMap.h" @@ -33,7 +33,7 @@ #include "threads.h" #include "uds.h" -static int readIndexPageMap(ComponentPortal *portal); +static int readIndexPageMap(ReadPortal *portal); static int writeIndexPageMap(IndexComponent *component, BufferedWriter *writer, unsigned int zone); @@ -298,19 +298,19 @@ uint64_t computeIndexPageMapSaveSize(const Geometry *geometry) * * @return UDS_SUCCESS or an error code, particularly UDS_CORRUPT_COMPONENT. **/ -static int retrieveFileVersion(ComponentPortal *portal, +static int retrieveFileVersion(ReadPortal *portal, const Geometry *geometry, byte *version, BufferedReader **readerPtr) { off_t size = 0; - int result = getComponentSize(portal, 0, &size); + int result = getComponentSizeForPortal(portal, 0, &size); if (result != UDS_SUCCESS) { logError("could not determine index page map info size"); return result; } BufferedReader *reader = NULL; - result = getBufferedReader(portal, 0, &reader); + result = getBufferedReaderForPortal(portal, 0, &reader); if (result != UDS_SUCCESS) { return result; } @@ -359,7 +359,7 @@ static int retrieveFileVersion(ComponentPortal *portal, } /*****************************************************************************/ -static int readIndexPageMap(ComponentPortal *portal) +static int readIndexPageMap(ReadPortal *portal) { IndexPageMap *map = componentDataForPortal(portal); diff --git a/utils/uds/indexStateData.c b/utils/uds/indexStateData.c index d13e3fec..1ae39e4b 100644 --- a/utils/uds/indexStateData.c +++ b/utils/uds/indexStateData.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * - * $Id: //eng/uds-releases/flanders/src/uds/indexStateData.c#2 $ + * $Id: //eng/uds-releases/flanders/src/uds/indexStateData.c#3 $ */ #include "indexStateData.h" @@ -114,7 +114,7 @@ static const IndexStateFile *const SUPPORTED_STATES[] = { static const IndexStateFile *const CURRENT_INDEX_STATE = &INDEX_STATE_301; /* The index state file component reader and writer */ -static int readIndexStateData(ComponentPortal *portal); +static int readIndexStateData(ReadPortal *portal); static int writeIndexStateData(IndexComponent *component, BufferedWriter *writer, unsigned int zone); @@ -215,10 +215,10 @@ static int readIndexState300(BufferedReader *reader, Index *index) * * @return UDS_SUCCESS or an error code **/ -static int readIndexStateData(ComponentPortal *portal) +static int readIndexStateData(ReadPortal *portal) { BufferedReader *reader = NULL; - int result = getBufferedReader(portal, 0, &reader); + int result = getBufferedReaderForPortal(portal, 0, &reader); if (result != UDS_SUCCESS) { return result; } diff --git a/utils/uds/masterIndexOps.c b/utils/uds/masterIndexOps.c index e92c26c0..b867656c 100644 --- a/utils/uds/masterIndexOps.c +++ b/utils/uds/masterIndexOps.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * - * $Id: //eng/uds-releases/flanders/src/uds/masterIndexOps.c#2 $ + * $Id: //eng/uds-releases/flanders/src/uds/masterIndexOps.c#3 $ */ #include "masterIndexOps.h" @@ -82,17 +82,13 @@ int computeMasterIndexSaveBlocks(const Configuration *config, } /**********************************************************************/ -static int readMasterIndex(ComponentPortal *portal) +static int readMasterIndex(ReadPortal *portal) { - unsigned int numZones = 0; - int result = countComponents(portal, &numZones); - if (result != UDS_SUCCESS) { - return result; - } + unsigned int numZones = countPartsForPortal(portal); MasterIndex *masterIndex = componentContextForPortal(portal); BufferedReader *readers[numZones]; for (unsigned int z = 0; z < numZones; ++z) { - result = getBufferedReader(portal, z, &readers[z]); + int result = getBufferedReaderForPortal(portal, z, &readers[z]); if (result != UDS_SUCCESS) { return logErrorWithStringError(result, "cannot read component for zone %u", z); diff --git a/utils/uds/openChapter.c b/utils/uds/openChapter.c index ec5c5f25..79d56c36 100644 --- a/utils/uds/openChapter.c +++ b/utils/uds/openChapter.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * - * $Id: //eng/uds-releases/flanders/src/uds/openChapter.c#2 $ + * $Id: //eng/uds-releases/flanders/src/uds/openChapter.c#3 $ */ #include "openChapter.h" @@ -25,7 +25,7 @@ #include "logger.h" #include "memoryAlloc.h" -static int readOpenChapters(ComponentPortal *portal); +static int readOpenChapters(ReadPortal *portal); static int writeOpenChapters(IndexComponent *component, BufferedWriter *writer, unsigned int zone); @@ -346,12 +346,12 @@ int loadOpenChapters(Index *index, BufferedReader *reader) } /**********************************************************************/ -int readOpenChapters(ComponentPortal *portal) +int readOpenChapters(ReadPortal *portal) { Index *index = componentDataForPortal(portal); BufferedReader *reader; - int result = getBufferedReader(portal, 0, &reader); + int result = getBufferedReaderForPortal(portal, 0, &reader); if (result != UDS_SUCCESS) { return result; } diff --git a/utils/vdo/base/Makefile b/utils/vdo/base/Makefile index 958c3b30..ffd4e252 100644 --- a/utils/vdo/base/Makefile +++ b/utils/vdo/base/Makefile @@ -17,7 +17,7 @@ # # $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/utils/vdo/base/Makefile#1 $ -VDO_VERSION = 6.1.1.8 +VDO_VERSION = 6.1.1.12 UDS_DIR = ../../uds diff --git a/utils/vdo/user/Makefile b/utils/vdo/user/Makefile index 22628326..e2e7975e 100644 --- a/utils/vdo/user/Makefile +++ b/utils/vdo/user/Makefile @@ -19,7 +19,7 @@ # $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/utils/vdo/user/Makefile#3 $ -VDO_VERSION = 6.1.1.8 +VDO_VERSION = 6.1.1.12 UDS_DIR = ../../uds VDO_BASE_DIR = ../base diff --git a/vdo.spec b/vdo.spec index c3551829..7b37f257 100644 --- a/vdo.spec +++ b/vdo.spec @@ -4,7 +4,7 @@ # Summary: Management tools for Virtual Data Optimizer Name: vdo -Version: 6.1.1.8 +Version: 6.1.1.12 Release: %{spec_release} License: GPLv2 Source: %{name}-%{version}.tgz @@ -191,4 +191,7 @@ systemctl disable vdo.service || : %changelog -* Mon Feb 12 2018 - J. corwin Coburn - 6.1.1.8-1 +* Sat Feb 17 2018 - J. corwin Coburn - 6.1.1.12-1 +- Added support for 4.15 kernels. +- Modified spec files to support building on more distros. +- Removed unused code from the UDS module.