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

Add error path stack traces

Check for errors from dm_task_set_name() and dm_task_run().
Add stack traces for error paths.
Return 0 if some error is found.
This commit is contained in:
Zdenek Kabelac 2010-11-30 22:32:44 +00:00
parent 81e606ab2c
commit 5b8abb1240

View File

@ -1594,8 +1594,15 @@ static int _process_mapper_dir(struct dm_task *dmt)
!strcmp(dirent->d_name, "..") || !strcmp(dirent->d_name, "..") ||
!strcmp(dirent->d_name, "control")) !strcmp(dirent->d_name, "control"))
continue; continue;
dm_task_set_name(dmt, dirent->d_name); if (!dm_task_set_name(dmt, dirent->d_name)) {
dm_task_run(dmt); r = 0;
stack;
continue; /* try next name */
}
if (!dm_task_run(dmt)) {
r = 0;
stack; /* keep going */
}
} }
if (closedir(d)) if (closedir(d))