shutdown, umount: use verbs consistently

Mounts are "unmounted".
Swaps are "deactivated", not "turned off" nor "disabled".
Loop and DM devices are "detached", not "deleted".

Especially the deleting sounded a bit scary.
This commit is contained in:
Michal Schmidt 2012-12-07 18:02:43 +01:00
parent bce93b7ac7
commit 735e071271
2 changed files with 9 additions and 9 deletions

View File

@ -207,15 +207,15 @@ int main(int argc, char *argv[]) {
}
if (need_swapoff) {
log_info("Disabling swaps.");
log_info("Deactivating swaps.");
r = swapoff_all(&changed);
if (r == 0) {
need_swapoff = false;
log_info("All swaps disabled.");
log_info("All swaps deactivated.");
} else if (r > 0)
log_info("Not all swaps are turned off, %d left.", r);
log_info("Not all swaps deactivated, %d left.", r);
else
log_error("Failed to turn off swaps: %s", strerror(-r));
log_error("Failed to deactivate swaps: %s", strerror(-r));
}
if (need_loop_detach) {

View File

@ -465,7 +465,7 @@ static int swap_points_list_off(MountPoint **head, bool *changed) {
assert(head);
LIST_FOREACH_SAFE(mount_point, m, n, *head) {
log_info("Disabling swap %s.", m->path);
log_info("Deactivating swap %s.", m->path);
if (swapoff(m->path) == 0) {
if (changed)
*changed = true;
@ -501,7 +501,7 @@ static int loopback_points_list_detach(MountPoint **head, bool *changed) {
continue;
}
log_info("Deleting loopback %s.", m->path);
log_info("Detaching loopback %s.", m->path);
r = delete_loopback(m->path);
if (r >= 0) {
if (r > 0 && changed)
@ -509,7 +509,7 @@ static int loopback_points_list_detach(MountPoint **head, bool *changed) {
mount_point_free(head, m);
} else {
log_warning("Could not delete loopback %s: %m", m->path);
log_warning("Could not detach loopback %s: %m", m->path);
n_failed++;
}
}
@ -536,7 +536,7 @@ static int dm_points_list_detach(MountPoint **head, bool *changed) {
continue;
}
log_info("Deleting DM %u:%u.", major(m->devnum), minor(m->devnum));
log_info("Detaching DM %u:%u.", major(m->devnum), minor(m->devnum));
r = delete_dm(m->devnum);
if (r >= 0) {
if (changed)
@ -544,7 +544,7 @@ static int dm_points_list_detach(MountPoint **head, bool *changed) {
mount_point_free(head, m);
} else {
log_warning("Could not delete DM %s: %m", m->path);
log_warning("Could not detach DM %s: %m", m->path);
n_failed++;
}
}