• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

Revision8016dc91cb68f9bfdb19c65bda7233eb0ae85196 (tree)
Time2019-12-17 13:15:46
AuthorAndrew Boie <andrew.p.boie@inte...>
CommiterChih-Wei Huang

Log Message

libdiskconfig: HACK Don't do space checks on zero-size images

If an image file is of zero size, assume we just want to expand it
to fit the available images.

Change-Id: If8f22eb12d3a5179960d4359307bb177e3323e8a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>

Change Summary

Incremental Difference

--- a/libdiskconfig/config_mbr.c
+++ b/libdiskconfig/config_mbr.c
@@ -259,11 +259,11 @@ config_mbr(struct disk_info *dinfo)
259259 }
260260
261261 /* if extended, need 1 lba for ebr */
262- if ((cur_lba + extended) >= dinfo->num_lba)
262+ if (dinfo->num_lba && (cur_lba + extended) >= dinfo->num_lba)
263263 goto nospace;
264264 else if (pinfo->len_kb != (uint32_t)-1) {
265265 uint32_t sz_lba = (pinfo->len_kb / dinfo->sect_size) * 1024;
266- if ((cur_lba + sz_lba + extended) > dinfo->num_lba)
266+ if (dinfo->num_lba && (cur_lba + sz_lba + extended) > dinfo->num_lba)
267267 goto nospace;
268268 }
269269