• 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/corennnnn


Commit MetaInfo

Revisão21c5d3112e0df3e30354f0cc49195d2e52ea9da2 (tree)
Hora2016-11-09 00:24:23
AutorAndrew Boie <andrew.p.boie@inte...>
CommiterChih-Wei Huang

Mensagem de Log

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>

Mudança Sumário

Diff

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