From 6966c5d8ace09789a22d294e4204e918d91c43d9 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 17 Dec 2007 13:39:14 +0200 Subject: [PATCH] Stick cpioMapFlags to fsm.h, they're only used by fsm.c - allows FSM* typedefs to move to where they belong --- lib/cpio.h | 21 ++------------------- lib/fsm.h | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/cpio.h b/lib/cpio.h index 03372bc..67589c5 100644 --- a/lib/cpio.h +++ b/lib/cpio.h @@ -12,6 +12,8 @@ * */ +#include "lib/fsm.h" + /** \ingroup payload * @note CPIO_CHECK_ERRNO bit is set only if errno is valid. */ @@ -53,21 +55,6 @@ enum cpioErrorReturns { CPIOERR_ENOTEMPTY = (31 ) }; -/** \ingroup payload - */ -typedef enum cpioMapFlags_e { - CPIO_MAP_PATH = (1 << 0), - CPIO_MAP_MODE = (1 << 1), - CPIO_MAP_UID = (1 << 2), - CPIO_MAP_GID = (1 << 3), - CPIO_FOLLOW_SYMLINKS= (1 << 4), /*!< only for building. */ - CPIO_MAP_ABSOLUTE = (1 << 5), - CPIO_MAP_ADDDOT = (1 << 6), - CPIO_ALL_HARDLINKS = (1 << 7), /*!< fail if hardlinks are missing. */ - CPIO_MAP_TYPE = (1 << 8), /*!< only for building. */ - CPIO_SBIT_CHECK = (1 << 9) -} cpioMapFlags; - #define CPIO_NEWC_MAGIC "070701" #define CPIO_CRC_MAGIC "070702" #define CPIO_TRAILER "TRAILER!!!" @@ -94,10 +81,6 @@ struct cpioCrcPhysicalHeader { #define PHYS_HDR_SIZE 110 /* Don't depend on sizeof(struct) */ -/* XXX circular includes avoidance... */ -typedef struct fsmIterator_s * FSMI_t; -typedef struct fsm_s * FSM_t; - #ifdef __cplusplus extern "C" { #endif diff --git a/lib/fsm.h b/lib/fsm.h index 5a661e7..aff13a9 100644 --- a/lib/fsm.h +++ b/lib/fsm.h @@ -6,7 +6,6 @@ * File state machine to handle a payload within an rpm package. */ -#include "lib/cpio.h" #include extern int _fsm_debug; @@ -88,6 +87,24 @@ typedef enum fileStage_e { #undef _fs #undef _fd +/** \ingroup payload + */ +typedef enum cpioMapFlags_e { + CPIO_MAP_PATH = (1 << 0), + CPIO_MAP_MODE = (1 << 1), + CPIO_MAP_UID = (1 << 2), + CPIO_MAP_GID = (1 << 3), + CPIO_FOLLOW_SYMLINKS= (1 << 4), /*!< only for building. */ + CPIO_MAP_ABSOLUTE = (1 << 5), + CPIO_MAP_ADDDOT = (1 << 6), + CPIO_ALL_HARDLINKS = (1 << 7), /*!< fail if hardlinks are missing. */ + CPIO_MAP_TYPE = (1 << 8), /*!< only for building. */ + CPIO_SBIT_CHECK = (1 << 9) +} cpioMapFlags; + +typedef struct fsmIterator_s * FSMI_t; +typedef struct fsm_s * FSM_t; + typedef struct hardLink_s * hardLink_t; /** \ingroup payload -- 2.7.4