summaryrefslogtreecommitdiff
path: root/sbuild/sbuild-lock.cc
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2006-07-17 13:04:22 +0000
committerRoger Leigh <rleigh@debian.org>2006-07-17 13:04:22 +0000
commit7b5831f90bae08d55c118e5df519d4cbb3c4c887 (patch)
tree55f4939a83809c7a4cede362fdfc48352147a820 /sbuild/sbuild-lock.cc
parent92dc204c1524ade6271f248861adcdf8daac0e81 (diff)
downloadschroot-7b5831f90bae08d55c118e5df519d4cbb3c4c887.tar.gz
* sbuild/sbuild-lock.cc: Rename _RELEASE error codes to _UNLOCK
and reword error messages to be uniform with chroot error messages. * sbuild/sbuild-chroot-config.cc: Rename CHROOT error to CHROOT_NOTFOUND, to reduce ambiguity.
Diffstat (limited to 'sbuild/sbuild-lock.cc')
-rw-r--r--sbuild/sbuild-lock.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/sbuild/sbuild-lock.cc b/sbuild/sbuild-lock.cc
index 7222fe7a..75c7117f 100644
--- a/sbuild/sbuild-lock.cc
+++ b/sbuild/sbuild-lock.cc
@@ -47,13 +47,13 @@ namespace
emap(lock::TIMEOUT_HANDLER, N_("Failed to set timeout handler")),
emap(lock::TIMEOUT_SET, N_("Failed to set timeout")),
emap(lock::TIMEOUT_CANCEL, N_("Failed to cancel timeout")),
- emap(lock::LOCK, N_("Failed to acquire lock")),
- emap(lock::LOCK_TIMEOUT, N_("Failed to acquire lock (timed out after %4% seconds)")),
- emap(lock::DEVICE_LOCK, N_("Failed to acquire device lock")),
- emap(lock::DEVICE_LOCK_TIMEOUT, N_("Failed to acquire device lock (timed out after %4% seconds; lock held by PID %5%)")),
+ emap(lock::LOCK, N_("Failed to lock file")),
+ emap(lock::LOCK_TIMEOUT, N_("Failed to lock file (timed out after %4% seconds)")),
+ emap(lock::DEVICE_LOCK, N_("Failed to lock device")),
+ emap(lock::DEVICE_LOCK_TIMEOUT, N_("Failed to lock device (timed out after %4% seconds; lock held by PID %5%)")),
emap(lock::DEVICE_TEST, N_("Failed to test device lock")),
- emap(lock::DEVICE_RELEASE, N_("Failed to release device lock")),
- emap(lock::DEVICE_RELEASE_TIMEOUT, N_("Failed to release device lock (timed out after %4% seconds; lock held by PID %5%)"))
+ emap(lock::DEVICE_UNLOCK, N_("Failed to unlock device")),
+ emap(lock::DEVICE_UNLOCK, N_("Failed to unlock device (timed out after %4% seconds; lock held by PID %5%)"))
};
}
@@ -262,7 +262,7 @@ device_lock::set_lock (type lock_type,
break;
else if (status < 0) // Failure
{
- throw error(DEVICE_RELEASE);
+ throw error(DEVICE_UNLOCK);
}
}
}
@@ -270,7 +270,7 @@ device_lock::set_lock (type lock_type,
if (lock_timeout)
{
throw error(((lock_type == LOCK_SHARED || lock_type == LOCK_EXCLUSIVE)
- ? DEVICE_LOCK_TIMEOUT : DEVICE_RELEASE_TIMEOUT),
+ ? DEVICE_LOCK_TIMEOUT : DEVICE_UNLOCK_TIMEOUT),
timeout, status);
}
unset_timer();