summaryrefslogtreecommitdiff
path: root/src/shared/specifier.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-09-17 10:03:46 -0500
committerLennart Poettering <lennart@poettering.net>2013-09-17 10:06:50 -0500
commit19f6d710772305610b928bc2678b9d77fe11e770 (patch)
treeca3e7b4f7f20f94137fcef96b92a7a208c72e1c5 /src/shared/specifier.h
parent0aafd43d235982510d1c40564079f7bcec0c7c19 (diff)
specifier: rework specifier calls to return proper error message
Previously the specifier calls could only indicate OOM by returning NULL. With this change they will return negative errno-style error codes like everything else.
Diffstat (limited to 'src/shared/specifier.h')
-rw-r--r--src/shared/specifier.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/shared/specifier.h b/src/shared/specifier.h
index d13e6406b6..fca206f665 100644
--- a/src/shared/specifier.h
+++ b/src/shared/specifier.h
@@ -21,7 +21,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef char* (*SpecifierCallback)(char specifier, void *data, void *userdata);
+typedef int (*SpecifierCallback)(char specifier, void *data, void *userdata, char **ret);
typedef struct Specifier {
const char specifier;
@@ -29,11 +29,11 @@ typedef struct Specifier {
void *data;
} Specifier;
-char *specifier_printf(const char *text, const Specifier table[], void *userdata);
+int specifier_printf(const char *text, const Specifier table[], void *userdata, char **ret);
-char *specifier_string(char specifier, void *data, void *userdata);
+int specifier_string(char specifier, void *data, void *userdata, char **ret);
-char *specifier_machine_id(char specifier, void *data, void *userdata);
-char *specifier_boot_id(char specifier, void *data, void *userdata);
-char *specifier_host_name(char specifier, void *data, void *userdata);
-char *specifier_kernel_release(char specifier, void *data, void *userdata);
+int specifier_machine_id(char specifier, void *data, void *userdata, char **ret);
+int specifier_boot_id(char specifier, void *data, void *userdata, char **ret);
+int specifier_host_name(char specifier, void *data, void *userdata, char **ret);
+int specifier_kernel_release(char specifier, void *data, void *userdata, char **ret);