summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2013-05-25 20:22:06 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2013-06-09 15:12:32 +0200
commitae635e3cf7559f3455b88a2499e7521d2094c416 (patch)
tree95caecc70907acbd859db092963123c93ef25d09 /apt-pkg/contrib/fileutl.h
parentc7873955a3b9419c5de49ee4665a6006b3bf6563 (diff)
set Fail flag in FileFd on all errors consistently
Previously some errors would set the Fail flag while some didn't without a clear reason as all errors leave a bad FileFd behind, so we use a helper now to ensure that all errors set the flag.
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r--apt-pkg/contrib/fileutl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index 426664d3a..3ec01dd9a 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -149,6 +149,10 @@ class FileFd
private:
FileFdPrivate* d;
bool OpenInternDescriptor(unsigned int const Mode, APT::Configuration::Compressor const &compressor);
+
+ // private helpers to set Fail flag and call _error->Error
+ bool FileFdErrno(const char* Function, const char* Description,...) __like_printf(3) __cold;
+ bool FileFdError(const char* Description,...) __like_printf(2) __cold;
};
bool RunScripts(const char *Cnf);