summaryrefslogtreecommitdiff
path: root/dselect/method.cc
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-10-10 19:43:08 +0200
committerGuillem Jover <guillem@debian.org>2014-10-12 05:20:09 +0200
commit02405cbb877a14ad8441e1a312cb56720f20df47 (patch)
treec6c4e41d6b70617f9f56c717d2e012568e8d3687 /dselect/method.cc
parent6669f360063b59bd0e4e70895947f6f370bcc3fc (diff)
downloaddpkg-02405cbb877a14ad8441e1a312cb56720f20df47.tar.gz
dselect: Mark for translation and improve sthfailed() strings
Diffstat (limited to 'dselect/method.cc')
-rw-r--r--dselect/method.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/dselect/method.cc b/dselect/method.cc
index a62f236db..d71ae2674 100644
--- a/dselect/method.cc
+++ b/dselect/method.cc
@@ -79,7 +79,7 @@ static void cu_unlockmethod(int, void**) {
assert(methlockfd);
fl.l_type=F_UNLCK; fl.l_whence= SEEK_SET; fl.l_start=fl.l_len=0;
if (fcntl(methlockfd,F_SETLK,&fl) == -1)
- sthfailed("unable to unlock access method area");
+ sthfailed(_("cannot unlock access method area"));
}
static enum urqresult ensureoptions(void) {
@@ -93,7 +93,7 @@ static enum urqresult ensureoptions(void) {
for (ccpp= methoddirectories; *ccpp; ccpp++)
readmethods(*ccpp, &newoptions, &nread);
if (!newoptions) {
- sthfailed("no access methods are available");
+ sthfailed(_("no access methods are available"));
return urqr_fail;
}
options= newoptions;
@@ -112,20 +112,20 @@ static enum urqresult lockmethod(void) {
methlockfd= open(methodlockfile, O_RDWR|O_CREAT|O_TRUNC, 0660);
if (methlockfd == -1) {
if ((errno == EPERM) || (errno == EACCES)) {
- sthfailed("requested operation requires superuser privilege");
+ sthfailed(_("requested operation requires superuser privilege"));
return urqr_fail;
}
- sthfailed("unable to open/create access method lockfile");
+ sthfailed(_("cannot open or create access method lockfile"));
return urqr_fail;
}
}
fl.l_type=F_WRLCK; fl.l_whence=SEEK_SET; fl.l_start=fl.l_len=0;
if (fcntl(methlockfd,F_SETLK,&fl) == -1) {
if (errno == EWOULDBLOCK || errno == EAGAIN) {
- sthfailed("the access method area is already locked");
+ sthfailed(_("the access method area is already locked"));
return urqr_fail;
}
- sthfailed("unable to lock access method area");
+ sthfailed(_("cannot lock access method area"));
return urqr_fail;
}
push_cleanup(cu_unlockmethod, ~0, nullptr, 0, 0);
@@ -184,7 +184,7 @@ static urqresult runscript(const char *exepath, const char *name) {
ur = falliblesubprocess(&cmd);
command_destroy(&cmd);
} else {
- sthfailed("no access method is selected/configured");
+ sthfailed(_("no access method is selected or configured"));
ur= urqr_fail;
}
pop_cleanup(ehflag_normaltidy);