summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/libstore/local-store.cc2
-rw-r--r--nix/libstore/optimise-store.cc4
-rw-r--r--nix/libutil/affinity.cc2
-rw-r--r--nix/nix-daemon/guix-daemon.cc21
4 files changed, 15 insertions, 14 deletions
diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc
index 43f3c1770a8..b8308b1aae5 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -654,7 +654,7 @@ uint64_t LocalStore::queryValidPathId(const Path & path)
{
auto use(stmtQueryPathInfo.use()(path));
if (!use.next())
- throw Error(std::format("path `%1%' is not valid", path));
+ throw Error(std::format("path `{}' is not valid", path));
return use.getInt(0);
}
diff --git a/nix/libstore/optimise-store.cc b/nix/libstore/optimise-store.cc
index 54aa166c344..93ce1f55365 100644
--- a/nix/libstore/optimise-store.cc
+++ b/nix/libstore/optimise-store.cc
@@ -182,12 +182,12 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa
}
if (st.st_size != stLink.st_size) {
- printMsg(lvlError, std::format("removing corrupted link `%1%'", linkPath));
+ printMsg(lvlError, std::format("removing corrupted link `{}'", linkPath));
unlink(linkPath.c_str());
goto retry;
}
- printMsg(lvlTalkative, std::format("linking `%1%' to `%2%'", path, linkPath));
+ printMsg(lvlTalkative, std::format("linking `{}' to `{}'", path, linkPath));
/* Make the containing directory writable, but only if it's not
the store itself (we don't want or need to mess with its
diff --git a/nix/libutil/affinity.cc b/nix/libutil/affinity.cc
index 53500c22ab9..38270c0eb4c 100644
--- a/nix/libutil/affinity.cc
+++ b/nix/libutil/affinity.cc
@@ -49,7 +49,7 @@ void restoreAffinity()
#if HAVE_SCHED_SETAFFINITY
if (!didSaveAffinity) return;
if (sched_setaffinity(0, sizeof(cpu_set_t), &savedAffinity) == -1)
- printMsg(lvlError, "failed to restore affinity %1%");
+ printMsg(lvlError, "failed to restore affinity");
#endif
}
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc
index 341e39c2907..58a6f3eba45 100644
--- a/nix/nix-daemon/guix-daemon.cc
+++ b/nix/nix-daemon/guix-daemon.cc
@@ -329,8 +329,8 @@ open_unix_domain_socket (const char *file)
struct sockaddr_un addr;
addr.sun_family = AF_UNIX;
if (fileRel.size () >= sizeof (addr.sun_path))
- throw Error (std::vformat( (_("socket file name '%1%' is too long")),
- std::make_format_args(fileRel)));
+ throw Error (std::vformat ((_("socket file name '{}' is too long")),
+ std::make_format_args (fileRel)));
strcpy (addr.sun_path, fileRel.c_str ());
unlink (file);
@@ -523,14 +523,15 @@ main (int argc, char *argv[])
/* We were not "socket-activated" so open the sockets specified by
LISTEN_OPTIONS. */
sockets = listening_sockets (listen_options);
- else {
- auto size = sockets.size();
- printMsg (lvlInfo,
- std::vformat((ngettext ("socket-activated with %1% socket",
- "socket-activated with %1% sockets",
- size)),
- std::make_format_args(size)));
- }
+ else
+ {
+ auto size = sockets.size();
+ printMsg (lvlInfo,
+ std::vformat((ngettext ("socket-activated with {} socket",
+ "socket-activated with {} sockets",
+ size)),
+ std::make_format_args(size)));
+ }
/* Effect all the changes made via 'settings.set'. */
settings.update ();