diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-04-16 06:57:22 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-04-16 06:57:22 +0200 |
commit | f65ceb9d8f5cb1a2f1cf0c41b82f118790645872 (patch) | |
tree | f4d5304fa85016e47f9a89aed39308e673779434 /src/bus.h | |
parent | misc (diff) | |
download | bus-f65ceb9d8f5cb1a2f1cf0c41b82f118790645872.tar.gz bus-f65ceb9d8f5cb1a2f1cf0c41b82f118790645872.tar.bz2 bus-f65ceb9d8f5cb1a2f1cf0c41b82f118790645872.tar.xz |
m + busname generation
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/bus.h')
-rw-r--r-- | src/bus.h | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -25,6 +25,9 @@ #define BUS_H +#ifndef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE +#endif #include <sys/types.h> @@ -49,6 +52,11 @@ */ #define BUS_EXCL 2 +/** + * Fail if interrupted + */ +#define BUS_INTR 4 + /** @@ -91,13 +99,15 @@ typedef struct bus /** * Create a new bus * - * @param file The pathname of the bus, `NULL` to create a random one - * @param flags `BUS_EXCL` (if `file` is not `NULL`) to fail if the file - * already exists, otherwise if the file exists, nothing - * will happen - * @return The pathname of the bus, `NULL` on error + * @param file The pathname of the bus, `NULL` to create a random one + * @param flags `BUS_EXCL` (if `file` is not `NULL`) to fail if the file + * already exists, otherwise if the file exists, nothing + * will happen; + * `BUS_INTR` to fail if interrupted + * @param out_file Output parameter for the pathname of the bus + * @return 0 on success, -1 on error */ -const char *bus_create(const char *file, int flags); +int bus_create(const char *file, int flags, char **out_file); /** * Remove a bus |