summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2005-12-09 15:08:55 +0000
committerChristian Heim <phreak@gentoo.org>2005-12-09 15:08:55 +0000
commite9bfd1e41c9da755fe0797fdff82f22104462919 (patch)
tree36433397e8756954d82c45abf739642d4ee78e0c /src/core/librcscripts/api
parentFixing last ChangeLog.vserver entry (goddammit it was rev 1733 and not 1773) (diff)
downloadbaselayout-vserver-e9bfd1e41c9da755fe0797fdff82f22104462919.tar.gz
baselayout-vserver-e9bfd1e41c9da755fe0797fdff82f22104462919.tar.bz2
baselayout-vserver-e9bfd1e41c9da755fe0797fdff82f22104462919.zip
Importing latest baselayout/trunk changes. This is a merge with 1752.
svn path=/baselayout-vserver/trunk/; revision=164
Diffstat (limited to 'src/core/librcscripts/api')
-rw-r--r--src/core/librcscripts/api/debug.h10
-rw-r--r--src/core/librcscripts/api/dynbuf.h15
-rw-r--r--src/core/librcscripts/api/parse.h6
-rw-r--r--src/core/librcscripts/api/runlevels.h2
4 files changed, 18 insertions, 15 deletions
diff --git a/src/core/librcscripts/api/debug.h b/src/core/librcscripts/api/debug.h
index a0b798f..14e3dc6 100644
--- a/src/core/librcscripts/api/debug.h
+++ b/src/core/librcscripts/api/debug.h
@@ -87,15 +87,15 @@ inline bool check_fp (FILE * fp);
*/
inline bool __check_arg_ptr (const void *ptr, const char *file, const char *func,
- size_t line);
+ size_t line);
inline bool __check_arg_str (const char *str, const char *file, const char *func,
- size_t line);
+ size_t line);
inline bool __check_arg_strv (char **str, const char *file, const char *func,
- size_t line);
+ size_t line);
inline bool __check_arg_fd (int fd, const char *file, const char *func,
- size_t line);
+ size_t line);
inline bool __check_arg_fp (FILE * fp, const char *file, const char *func,
- size_t line);
+ size_t line);
#define check_arg_ptr(_ptr) \
__check_arg_ptr (_ptr, __FILE__, __FUNCTION__, __LINE__)
diff --git a/src/core/librcscripts/api/dynbuf.h b/src/core/librcscripts/api/dynbuf.h
index 3b0049e..5c937b6 100644
--- a/src/core/librcscripts/api/dynbuf.h
+++ b/src/core/librcscripts/api/dynbuf.h
@@ -33,21 +33,24 @@ typedef struct
size_t length; /* Length of data block */
size_t rd_index; /* Current read index */
size_t wr_index; /* Current write index */
+ bool file_map; /* File mapped as dynbuf */
} dyn_buf_t;
dyn_buf_t *new_dyn_buf (void);
-void free_dyn_buf (dyn_buf_t * dynbuf);
+dyn_buf_t *new_dyn_buf_mmap_file (const char *name);
-int write_dyn_buf (dyn_buf_t * dynbuf, const char *buf, size_t length);
+void free_dyn_buf (dyn_buf_t *dynbuf);
-int write_dyn_buf_from_fd (int fd, dyn_buf_t * dynbuf, size_t length);
+int write_dyn_buf (dyn_buf_t *dynbuf, const char *buf, size_t length);
-int sprintf_dyn_buf (dyn_buf_t * dynbuf, const char *format, ...);
+int write_dyn_buf_from_fd (int fd, dyn_buf_t *dynbuf, size_t length);
-int read_dyn_buf (dyn_buf_t * dynbuf, char *buf, size_t length);
+int sprintf_dyn_buf (dyn_buf_t *dynbuf, const char *format, ...);
-int read_dyn_buf_to_fd (int fd, dyn_buf_t * dynbuf, size_t length);
+int read_dyn_buf (dyn_buf_t *dynbuf, char *buf, size_t length);
+
+int read_dyn_buf_to_fd (int fd, dyn_buf_t *dynbuf, size_t length);
char *read_line_dyn_buf (dyn_buf_t *dynbuf);
diff --git a/src/core/librcscripts/api/parse.h b/src/core/librcscripts/api/parse.h
index 911793c..b5e07fa 100644
--- a/src/core/librcscripts/api/parse.h
+++ b/src/core/librcscripts/api/parse.h
@@ -35,15 +35,15 @@
#define FIELD_PROVIDE "PROVIDE"
#define FIELD_FAILED "FAILED"
-size_t generate_stage1 (dyn_buf_t * data);
-size_t generate_stage2 (dyn_buf_t * data);
+size_t generate_stage1 (dyn_buf_t *data);
+size_t generate_stage2 (dyn_buf_t *data);
size_t read_stage2 (char **data);
int write_stage2 (FILE * outfile);
size_t generate_stage3 (char **data);
size_t read_stage3 (char **data);
int write_stage3 (FILE * outfile);
int write_legacy_stage3 (FILE * output);
-int parse_cache (const dyn_buf_t * data);
+int parse_cache (const dyn_buf_t *data);
/*
* get_rcscripts()
diff --git a/src/core/librcscripts/api/runlevels.h b/src/core/librcscripts/api/runlevels.h
index 59906af..ccc9ed0 100644
--- a/src/core/librcscripts/api/runlevels.h
+++ b/src/core/librcscripts/api/runlevels.h
@@ -37,7 +37,7 @@ struct list_head runlevel_list;
int get_runlevels (void);
-runlevel_info_t * get_runlevel_info (const char *runlevel);
+runlevel_info_t *get_runlevel_info (const char *runlevel);
bool is_runlevel (const char *runlevel);