summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-12-28 01:02:47 +0100
committerMarius Bakke <marius@gnu.org>2022-12-28 01:02:47 +0100
commitec0fbb471dfc6f72796da9ebafbb0630daa91267 (patch)
tree3b42f3d0a6470d85fbb8421179634bb278883e4e /nix
parentf5ef7d34e4deecb80aff585c108b0a2ab1f33ce4 (diff)
parent0cb8f7125b19264b01962c1249c3df4c5ce85aa9 (diff)
downloadguix-ec0fbb471dfc6f72796da9ebafbb0630daa91267.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'nix')
-rw-r--r--nix/libstore/build.cc2
-rw-r--r--nix/libutil/hash.cc2
-rw-r--r--nix/libutil/util.cc4
3 files changed, 4 insertions, 4 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 10a6093bd5..c5383bc756 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -2576,7 +2576,7 @@ Path DerivationGoal::openLogFile()
         closeOnExec(fd);
 
         if (!(fLogFile = fdopen(fd.borrow(), "w")))
-            throw SysError(format("opening file `%1%'") % logFileName);
+            throw SysError(format("opening log file `%1%'") % logFileName);
 
         int err;
         if (!(bzLogFile = BZ2_bzWriteOpen(&err, fLogFile, 9, 0, 0)))
diff --git a/nix/libutil/hash.cc b/nix/libutil/hash.cc
index 7853acdd49..9ba604eb85 100644
--- a/nix/libutil/hash.cc
+++ b/nix/libutil/hash.cc
@@ -244,7 +244,7 @@ Hash hashFile(HashType ht, const Path & path)
     start(ht, ctx);
 
     AutoCloseFD fd = open(path.c_str(), O_RDONLY);
-    if (fd == -1) throw SysError(format("opening file `%1%'") % path);
+    if (fd == -1) throw SysError(format("computing hash of file `%1%'") % path);
 
     unsigned char buf[8192];
     ssize_t n;
diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc
index 4d3780e3c2..82eac72120 100644
--- a/nix/libutil/util.cc
+++ b/nix/libutil/util.cc
@@ -264,7 +264,7 @@ string readFile(const Path & path, bool drain)
 {
     AutoCloseFD fd = open(path.c_str(), O_RDONLY);
     if (fd == -1)
-        throw SysError(format("opening file `%1%'") % path);
+        throw SysError(format("reading file `%1%'") % path);
     return drain ? drainFD(fd) : readFile(fd);
 }
 
@@ -273,7 +273,7 @@ void writeFile(const Path & path, const string & s)
 {
     AutoCloseFD fd = open(path.c_str(), O_WRONLY | O_TRUNC | O_CREAT, 0666);
     if (fd == -1)
-        throw SysError(format("opening file '%1%'") % path);
+        throw SysError(format("writing file '%1%'") % path);
     writeFull(fd, s);
 }