1 Star 0 Fork 26

段涛涛/parted

forked from src-openEuler/parted 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
9001-bugfix-parted-fix-failure-of-mklabel-gpt_sync_mbr.patch 1011 Bytes
一键复制 编辑 原始数据 按行查看 历史
eulerstorage 提交于 2020-01-11 11:08 . update package from 3.2 to 3.3
From e4785bbb25781c27b89c735478f4a8b0b7ea8180 Mon Sep 17 00:00:00 2001
From: louhongxiang <[email protected]>
Date: Sun, 17 Mar 2019 21:29:49 -0400
Subject: [PATCH] parted: fix failure of mklabel gpt_sync_mbr.
reason:fix failure of mklabel gpt_sync_mbr.
Signed-off-by: louhongxiang <[email protected]>
---
libparted/labels/gpt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
index d94add1..6e7bbf2 100644
--- a/libparted/labels/gpt.c
+++ b/libparted/labels/gpt.c
@@ -630,6 +630,7 @@ gpt_sync_mbr_alloc (const PedDevice *dev)
data_start = 2 + GPT_DEFAULT_PARTITION_ENTRY_ARRAY_SIZE / dev->sector_size;
data_end = dev->length - 2
- GPT_DEFAULT_PARTITION_ENTRY_ARRAY_SIZE / dev->sector_size;
+ gpt_disk_data->AlternateLBA = dev->length - 1;
ped_geometry_init (&gpt_disk_data->data_area, dev, data_start,
data_end - data_start + 1);
gpt_disk_data->entry_count = GPT_DEFAULT_PARTITION_ENTRIES;
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/duan_tao_tao/parted.git
[email protected]:duan_tao_tao/parted.git
duan_tao_tao
parted
parted
master

搜索帮助