7 Star 0 Fork 13

src-openEuler/dmraid

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-ddf1_lsi_persistent_name.patch 685 Bytes
一键复制 编辑 原始数据 按行查看 历史
eulerstorage 提交于 2019-12-31 17:23 . package init
diff --git a/lib/format/ddf/ddf1.c.lsi_name b/lib/format/ddf/ddf1.c
index 05b550b..c8e484b 100644
--- a/lib/format/ddf/ddf1.c
+++ b/lib/format/ddf/ddf1.c
@@ -696,6 +696,16 @@ name(struct lib_context *lc, struct ddf1 *ddf1, struct raid_dev *rd)
sprintf(b, "%02x%02x%02x%02x",
vd->guid[i], vd->guid[i + 1],
vd->guid[i + 2], vd->guid[i + 3]);
+
+ /*
+ * Because the LSI bios changes the timestamp in the
+ * metadata on every boot, we have to neutralize it
+ * in order to allow for persistent names.
+ *
+ * Using a dummy string "47114711" for that.
+ */
+ if (!strncmp((char *) vd->guid, "LSI", 3))
+ strncpy(buf + prefix + 32, "47114711", 8);
}
out:
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/dmraid.git
[email protected]:src-openeuler/dmraid.git
src-openeuler
dmraid
dmraid
master

搜索帮助