This reverts commit d8d09c1633b2f06f88633ab960aa02b41a6bdfb6.
Signed-off-by: Mariusz Tkaczyk <redacted>
---
Assemble.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Assemble.c b/Assemble.c
index 9d042055ad4e..550369ae8403 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1984,10 +1984,12 @@ int assemble_container_content(struct supertype *st, int mdfd,
return 1;
}
- /* Fill sysfs properties only if they are not set. Determine it by checking text_version
- * and ignoring special character on the first place.
- */
- if (strcmp(sra->text_version + 1, content->text_version + 1) != 0) {
+ if (strcmp(sra->text_version, content->text_version) != 0) {
+ if (content->array.major_version == -1 &&
+ content->array.minor_version == -2 &&
+ c->readonly &&
+ content->text_version[0] == '/')
+ content->text_version[0] = '-';
if (sysfs_set_array(content, 9003) != 0) {
sysfs_free(sra);
return 1;--
2.35.3