summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sofort/sofort.h48
1 files changed, 28 insertions, 20 deletions
diff --git a/include/sofort/sofort.h b/include/sofort/sofort.h
index 61620bf..a479e73 100644
--- a/include/sofort/sofort.h
+++ b/include/sofort/sofort.h
@@ -58,6 +58,11 @@ enum sfrt_custom_error {
SFRT_ERR_CAP,
};
+struct sfrt_input {
+ void * addr;
+ size_t size;
+};
+
struct sfrt_source_version {
int major;
int minor;
@@ -65,11 +70,6 @@ struct sfrt_source_version {
const char * commit;
};
-struct sfrt_input {
- void * addr;
- size_t size;
-};
-
struct sfrt_error_info {
const struct sfrt_driver_ctx * edctx;
const struct sfrt_unit_ctx * euctx;
@@ -104,26 +104,34 @@ struct sfrt_unit_ctx {
void * any;
};
-/* package info */
-sfrt_api const struct sfrt_source_version * sfrt_source_version(void);
-
/* driver api */
-sfrt_api int sfrt_get_driver_ctx (char ** argv, char ** envp, uint32_t flags, struct sfrt_driver_ctx **);
-sfrt_api void sfrt_free_driver_ctx (struct sfrt_driver_ctx *);
+sfrt_api int sfrt_get_driver_ctx (char ** argv, char ** envp, uint32_t flags,
+ struct sfrt_driver_ctx **);
+
+sfrt_api void sfrt_free_driver_ctx (struct sfrt_driver_ctx *);
-sfrt_api int sfrt_get_unit_ctx (const struct sfrt_driver_ctx *, const char * path, struct sfrt_unit_ctx **);
-sfrt_api void sfrt_free_unit_ctx (struct sfrt_unit_ctx *);
+sfrt_api int sfrt_get_unit_ctx (const struct sfrt_driver_ctx *, const char * path,
+ struct sfrt_unit_ctx **);
-sfrt_api int sfrt_map_input (const struct sfrt_driver_ctx *, int fd, const char * path, int prot, struct sfrt_input *);
-sfrt_api int sfrt_unmap_input (struct sfrt_input *);
+sfrt_api void sfrt_free_unit_ctx (struct sfrt_unit_ctx *);
/* utility api */
-sfrt_api int sfrt_main (int, char **, char **);
-sfrt_api int sfrt_output_dummy (const struct sfrt_common_ctx *, FILE *); /* dummy */
-sfrt_api int sfrt_output_name (const struct sfrt_unit_ctx *, FILE *); /* dummy */
-sfrt_api int sfrt_output_address (const struct sfrt_unit_ctx *, FILE *); /* dummy */
-sfrt_api int sfrt_output_error_record (const struct sfrt_driver_ctx *, const struct sfrt_error_info *);
-sfrt_api int sfrt_output_error_vector (const struct sfrt_driver_ctx *);
+sfrt_api int sfrt_main (int, char **, char **);
+sfrt_api int sfrt_output_dummy (const struct sfrt_common_ctx *, FILE *); /* dummy */
+sfrt_api int sfrt_output_name (const struct sfrt_unit_ctx *, FILE *); /* dummy */
+sfrt_api int sfrt_output_address (const struct sfrt_unit_ctx *, FILE *); /* dummy */
+sfrt_api int sfrt_output_error_record (const struct sfrt_driver_ctx *, const struct sfrt_error_info *);
+sfrt_api int sfrt_output_error_vector (const struct sfrt_driver_ctx *);
+
+/* raw input api */
+sfrt_api int sfrt_map_input (const struct sfrt_driver_ctx *,
+ int, const char *, int,
+ struct sfrt_input *);
+
+sfrt_api int sfrt_unmap_input (struct sfrt_input *);
+
+/* package info */
+sfrt_api const struct sfrt_source_version * sfrt_source_version(void);
#ifdef __cplusplus
}