aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-15 14:12:39 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-15 14:12:39 +0200
commite14e62fddde3b00ee82a8da29725f571ad8ecee1 (patch)
tree26e16b53292f90a93241320bfb0c42234be1c227 /src/libstore
parent1fb762d11fadc659ef41b79eaddddcce5fbbc192 (diff)
Remove trailing whitespace
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/daemon.cc2
-rw-r--r--src/libstore/filetransfer.cc4
-rw-r--r--src/libstore/local-store.cc10
-rw-r--r--src/libstore/optimise-store.cc6
-rw-r--r--src/libstore/store-api.cc2
5 files changed, 12 insertions, 12 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index 172cfe3cb..620722516 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -77,7 +77,7 @@ struct TunnelLogger : public Logger
{
if (ei.level > verbosity) return;
- std::stringstream oss;
+ std::stringstream oss;
oss << ei;
StringSink buf;
diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc
index 6ca3393ab..601cb858a 100644
--- a/src/libstore/filetransfer.cc
+++ b/src/libstore/filetransfer.cc
@@ -599,9 +599,9 @@ struct curlFileTransfer : public FileTransfer
workerThreadMain();
} catch (nix::Interrupted & e) {
} catch (std::exception & e) {
- logError({
+ logError({
.name = "File transfer",
- .hint = hintfmt("unexpected error in download thread: %s",
+ .hint = hintfmt("unexpected error in download thread: %s",
e.what())
});
}
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 5521b8633..f5c5bd9b7 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -87,7 +87,7 @@ LocalStore::LocalStore(const Params & params)
struct group * gr = getgrnam(settings.buildUsersGroup.get().c_str());
if (!gr)
- logError({
+ logError({
.name = "'build-users-group' not found",
.hint = hintfmt(
"warning: the group '%1%' specified in 'build-users-group' does not exist",
@@ -1223,7 +1223,7 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
Path linkPath = linksDir + "/" + link.name;
string hash = hashPath(htSHA256, linkPath).first.to_string(Base32, false);
if (hash != link.name) {
- logError({
+ logError({
.name = "Invalid hash",
.hint = hintfmt(
"link '%s' was modified! expected hash '%s', got '%s'",
@@ -1261,7 +1261,7 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
auto current = hashSink->finish();
if (info->narHash != nullHash && info->narHash != current.first) {
- logError({
+ logError({
.name = "Invalid hash - path modified",
.hint = hintfmt("path '%s' was modified! expected hash '%s', got '%s'",
printStorePath(i), info->narHash.to_string(Base32, true), current.first.to_string(Base32, true))
@@ -1316,7 +1316,7 @@ void LocalStore::verifyPath(const Path & pathS, const StringSet & store,
if (!done.insert(pathS).second) return;
if (!isStorePath(pathS)) {
- logError({
+ logError({
.name = "Nix path not found",
.hint = hintfmt("path '%s' is not in the Nix store", pathS)
});
@@ -1342,7 +1342,7 @@ void LocalStore::verifyPath(const Path & pathS, const StringSet & store,
auto state(_state.lock());
invalidatePath(*state, path);
} else {
- logError({
+ logError({
.name = "Missing path with referrers",
.hint = hintfmt("path '%s' disappeared, but it still has valid referrers!", pathS)
});
diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc
index d760d110c..b2b2412a3 100644
--- a/src/libstore/optimise-store.cc
+++ b/src/libstore/optimise-store.cc
@@ -130,7 +130,7 @@ void LocalStore::optimisePath_(Activity * act, OptimiseStats & stats,
NixOS (example: $fontconfig/var/cache being modified). Skip
those files. FIXME: check the modification time. */
if (S_ISREG(st.st_mode) && (st.st_mode & S_IWUSR)) {
- logWarning({
+ logWarning({
.name = "Suspicious file",
.hint = hintfmt("skipping suspicious writable file '%1%'", path)
});
@@ -197,7 +197,7 @@ void LocalStore::optimisePath_(Activity * act, OptimiseStats & stats,
}
if (st.st_size != stLink.st_size) {
- logWarning({
+ logWarning({
.name = "Corrupted link",
.hint = hintfmt("removing corrupted link '%1%'", linkPath)
});
@@ -235,7 +235,7 @@ void LocalStore::optimisePath_(Activity * act, OptimiseStats & stats,
/* Atomically replace the old file with the new hard link. */
if (rename(tempLink.c_str(), path.c_str()) == -1) {
if (unlink(tempLink.c_str()) == -1)
- logError({
+ logError({
.name = "Unlink error",
.hint = hintfmt("unable to unlink '%1%'", tempLink)
});
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 464261010..e23a9ca50 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -777,7 +777,7 @@ bool ValidPathInfo::isContentAddressed(const Store & store) const
auto warn = [&]() {
logWarning(
ErrorInfo{
- .name = "Path not content-addressed",
+ .name = "Path not content-addressed",
.hint = hintfmt("path '%s' claims to be content-addressed but isn't", store.printStorePath(path))
});
};