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:
parent
ba61f84874
commit
30a653105c
@ -1542,8 +1542,10 @@ static int _mirror_emit_segment_line(struct dm_task *dmt, uint32_t major,
|
|||||||
const char *logtype;
|
const char *logtype;
|
||||||
unsigned kmaj, kmin, krel;
|
unsigned kmaj, kmin, krel;
|
||||||
|
|
||||||
if (!uname(&uts) || sscanf(uts.release, "%u.%u.%u", &kmaj, &kmin, &krel) != 3)
|
if (uname(&uts) == -1 || sscanf(uts.release, "%u.%u.%u", &kmaj, &kmin, &krel) != 3) {
|
||||||
return_0;
|
log_error("Cannot read kernel release version");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ((seg->flags & DM_BLOCK_ON_ERROR)) {
|
if ((seg->flags & DM_BLOCK_ON_ERROR)) {
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user