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

Fix copy&paste detection of kernel release version.

Add log_error to avoid return_0 without log_error.
This commit is contained in:
Zdenek Kabelac 2010-05-25 08:40:36 +00:00
parent ba61f84874
commit 30a653105c

View File

@ -1542,8 +1542,10 @@ static int _mirror_emit_segment_line(struct dm_task *dmt, uint32_t major,
const char *logtype;
unsigned kmaj, kmin, krel;
if (!uname(&uts) || sscanf(uts.release, "%u.%u.%u", &kmaj, &kmin, &krel) != 3)
return_0;
if (uname(&uts) == -1 || sscanf(uts.release, "%u.%u.%u", &kmaj, &kmin, &krel) != 3) {
log_error("Cannot read kernel release version");
return 0;
}
if ((seg->flags & DM_BLOCK_ON_ERROR)) {
/*