summaryrefslogtreecommitdiffstats
path: root/ini/ini_config_priv.h
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2012-03-18 14:46:37 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-04-05 11:20:08 -0700
commit89bd6c4dbb49ed8e6a540bb934ac7ac1ded1940e (patch)
treeeb6fe7ecf3b4b54513de9398f173bb9d5d008f67 /ini/ini_config_priv.h
parentbe389dc97e64653ca17ad76564dcc89ca7905937 (diff)
downloadding-libs-89bd6c4dbb49ed8e6a540bb934ac7ac1ded1940e.tar.gz
ding-libs-89bd6c4dbb49ed8e6a540bb934ac7ac1ded1940e.tar.xz
ding-libs-89bd6c4dbb49ed8e6a540bb934ac7ac1ded1940e.zip
Metadata collection is gone
After some more thinking I decided not to use metadata collection. It seems to be an overhead. Patch does following: * Replaces metadata collection in file context structure with standard file stats * Removes all operations against old metadata collection * Defines new flags for data to collect * Creates a function that consolidates common operations between open and reopen functions.
Diffstat (limited to 'ini/ini_config_priv.h')
-rw-r--r--ini/ini_config_priv.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/ini/ini_config_priv.h b/ini/ini_config_priv.h
index 1880c3f..84742c7 100644
--- a/ini/ini_config_priv.h
+++ b/ini/ini_config_priv.h
@@ -22,6 +22,9 @@
#ifndef INI_CONFIG_PRIV_H
#define INI_CONFIG_PRIV_H
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
#include "collection.h"
/* Configuration object */
@@ -45,21 +48,19 @@ struct ini_cfgfile {
char *filename;
/* File stream */
FILE *file;
- /* File descriptor that is passed in */
- int fd;
/* Error level */
int error_level;
/* Collision flags - define how to merge things */
uint32_t collision_flags;
- /* Collision flags - define how to merge things */
+ /* What meta data to collect */
uint32_t metadata_flags;
/**********************/
/* Internal variables */
/**********************/
/* Collection of errors detected during parsing */
struct collection_item *error_list;
- /* Metadata about the file */
- struct collection_item *metadata;
+ /* File stats */
+ struct stat file_stats;
/* Count of error lines */
unsigned count;
};