aboutsummaryrefslogtreecommitdiffstats
path: root/src/io_error.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-14 22:20:46 +0100
committerMax Kellermann <max@duempel.org>2013-01-15 00:53:12 +0100
commit31268ffa24eb9f20c4dbca82b5b2d0bd43e7f6a3 (patch)
treef91baa74980175504c60db631fcf49034e900f31 /src/io_error.h
parent0634be9724edd3cb867ad0398da28df1fc9e4e88 (diff)
downloadmpd-31268ffa24eb9f20c4dbca82b5b2d0bd43e7f6a3.tar.gz
mpd-31268ffa24eb9f20c4dbca82b5b2d0bd43e7f6a3.tar.xz
mpd-31268ffa24eb9f20c4dbca82b5b2d0bd43e7f6a3.zip
io_error: add function new_error_errno()
Diffstat (limited to 'src/io_error.h')
-rw-r--r--src/io_error.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/io_error.h b/src/io_error.h
index c89748360..930ced108 100644
--- a/src/io_error.h
+++ b/src/io_error.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2012 The Music Player Daemon Project
+ * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -41,4 +41,11 @@ set_error_errno(GError **error_r)
g_strerror(errno));
}
+static inline GError *
+new_error_errno(void)
+{
+ return g_error_new_literal(errno_quark(), errno,
+ g_strerror(errno));
+}
+
#endif