diff options
author | Tom Gundersen <teg@jklm.no> | 2015-08-11 18:22:59 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-08-11 23:38:19 +0200 |
commit | 458a2f85e8ae08c534bf8d030fbeeb791893422b (patch) | |
tree | a20e0446c9b879f0f19faa8dc4d970b780d3b4e2 /src/gpt-auto-generator | |
parent | 7a1494aa4e4a131d73e866cf1e7eb7b6e47dbab8 (diff) |
gpt-auto-generator: warn on ambiguous blkid probe
Diffstat (limited to 'src/gpt-auto-generator')
-rw-r--r-- | src/gpt-auto-generator/gpt-auto-generator.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index bfcdbc5fd0..0a34f86be7 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -618,9 +618,12 @@ static int enumerate_partitions(dev_t devnum) { errno = 0; r = blkid_do_safeprobe(b); - if (r == -2 || r == 1) /* no result or uncertain */ + if (r == 1) + return 0; /* no results */ + else if (r == -2) { + log_warning("%s: probe gave ambiguous results, ignoring", node); return 0; - else if (r != 0) + } else if (r != 0) return log_error_errno(errno ?: EIO, "%s: failed to probe: %m", node); errno = 0; |