Always initialize label field
OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=25
This commit is contained in:
parent
804a125886
commit
a75a0a82b1
@ -1,13 +1,23 @@
|
||||
commit 8009e46dc1d43f075740025d15a91cbcfd91cec2
|
||||
Author: Ignaz Forster <iforster@suse.com>
|
||||
Date: Mon Sep 2 19:14:18 2019 +0200
|
||||
|
||||
Continue on empty GPT partition label
|
||||
|
||||
In case no GPT partition label is set don't abort execution.
|
||||
|
||||
diff --git a/internal/exec/util/blkid.c b/internal/exec/util/blkid.c
|
||||
index 7762d57..3ac8395 100644
|
||||
index 7762d57..35e876c 100644
|
||||
--- a/internal/exec/util/blkid.c
|
||||
+++ b/internal/exec/util/blkid.c
|
||||
@@ -201,7 +201,7 @@ static result_t extract_part_info(blkid_partition part, struct partition_info *i
|
||||
@@ -201,7 +201,9 @@ static result_t extract_part_info(blkid_partition part, struct partition_info *i
|
||||
// label
|
||||
ctmp = blkid_partition_get_name(part);
|
||||
err = checked_copy(info->label, ctmp, PART_INFO_BUF_SIZE);
|
||||
- if (err)
|
||||
+ if (err && err != RESULT_LOOKUP_FAILED)
|
||||
+ if (err == RESULT_LOOKUP_FAILED)
|
||||
+ strcpy(info->label, "");
|
||||
+ else if (err)
|
||||
return err;
|
||||
|
||||
// uuid
|
||||
|
Loading…
Reference in New Issue
Block a user