about summary refs log tree commit diff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 305e470ebde0..60be02cd4647 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -45,8 +45,14 @@ BaseError & BaseError::addPrefix(const FormatOrString & fs)
 
 
 SysError::SysError(const FormatOrString & fs)
-    : Error(format("%1%: %2%") % fs.s % strerror(errno))
-    , errNo(errno)
+    : SysError(errno, fs)
+{
+}
+
+
+SysError::SysError(int errNo, const FormatOrString & fs)
+    : Error(format("%1%: %2%") % fs.s % strerror(errNo))
+    , errNo(errNo)
 {
 }