1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Improve log messages.

This commit is contained in:
Alasdair Kergon 2002-03-20 14:34:15 +00:00
parent 9585e50fef
commit 158510ad42
2 changed files with 15 additions and 4 deletions

View File

@ -25,6 +25,19 @@
#define ALIGNMENT sizeof(int) #define ALIGNMENT sizeof(int)
static char *dm_cmd_list[] = {
"create",
"reload",
"remove",
"remove_all",
"suspend",
"resume",
"info",
"deps",
"rename",
"version"
};
void dm_task_destroy(struct dm_task *dmt) void dm_task_destroy(struct dm_task *dmt)
{ {
struct target *t, *n; struct target *t, *n;
@ -325,6 +338,8 @@ int dm_task_run(struct dm_task *dmt)
goto bad; goto bad;
} }
log_debug("dm %s %s %s %s", dm_cmd_list[dmt->type], dmi->name,
dmi->uuid, dmt->newname ? dmt->newname : "");
if (ioctl(fd, command, dmi) < 0) { if (ioctl(fd, command, dmi) < 0) {
log_error("device-mapper ioctl cmd %d failed: %s", dmt->type, log_error("device-mapper ioctl cmd %d failed: %s", dmt->type,
strerror(errno)); strerror(errno));

View File

@ -119,8 +119,6 @@ int dm_task_set_name(struct dm_task *dmt, const char *name)
return 0; return 0;
} }
log_debug("Setting name: %s", dmt->dev_name);
return 1; return 1;
} }
@ -136,8 +134,6 @@ int dm_task_set_uuid(struct dm_task *dmt, const char *uuid)
return 0; return 0;
} }
log_debug("Setting uuid: %s", dmt->uuid);
return 1; return 1;
} }