aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-06-22 10:55:03 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-06-22 10:55:03 -0700
commitd966918e7304ff405fae20916cf137d737c92dea (patch)
tree67dfe5d27d7abbcc7fae039787e87f8dc7406295 /utils
parente2a24eacc5d5ab9f994bcee17bf7d65e2178b6d1 (diff)
downloadsyslinux-d966918e7304ff405fae20916cf137d737c92dea.tar.gz
syslinux-d966918e7304ff405fae20916cf137d737c92dea.tar.xz
syslinux-d966918e7304ff405fae20916cf137d737c92dea.zip
memdisk: add a sector_shift field to the MDI; fix memdiskfind
Add a sector_shift field to the MDI rather than assuming 512-byte sectors. Fix memdiskfind to report size in bytes, not in sectors. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/memdiskfind.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/memdiskfind.c b/utils/memdiskfind.c
index 45d54bc7..f2086b23 100644
--- a/utils/memdiskfind.c
+++ b/utils/memdiskfind.c
@@ -60,7 +60,13 @@ static bool valid_mbft(const struct mBFT *mbft, size_t space)
static void output_params(const struct mBFT *mbft)
{
- printf("%u,%u\n", mbft->mdi.diskbuf, mbft->mdi.disksize);
+ int sector_shift = mbft->mdi.sector_shift;
+
+ if (!sector_shift)
+ sector_shift = 9;
+
+ printf("%#x,%#x\n",
+ mbft->mdi.diskbuf, mbft->mdi.disksize << sector_shift);
}
int main(int argc, char *argv[])