[syslinux:pathbased] pxe: set the block size in the fs structure

syslinux-bot for H. Peter Anvin hpa at zytor.com
Tue Feb 23 19:18:13 PST 2010


Commit-ID:  dafd02cb11048f53e2de221d4b642fd4ba4dbb6a
Gitweb:     http://syslinux.zytor.com/commit/dafd02cb11048f53e2de221d4b642fd4ba4dbb6a
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Tue, 23 Feb 2010 19:09:44 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Tue, 23 Feb 2010 19:09:44 -0800

pxe: set the block size in the fs structure

For better or worse, we use block counts for communicating with the
filesystem.  It would therefore be rather polite to tell them what
block size we expect.

This fixes a boot failure with the new loadhigh routine.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 core/fs/pxe/pxe.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index 56f8ee4..e58901d 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -1474,6 +1474,10 @@ static int pxe_fs_init(struct fs_info *fs)
 {
     (void)fs;    /* drop the compile warning message */
 
+    /* This block size is actually arbitrary... */
+    fs->sector_shift = fs->block_shift = TFTP_BLOCKSIZE_LG2;
+    fs->sector_size  = fs->block_size  = 1 << TFTP_BLOCKSIZE_LG2;
+
     /* Initialize the Files structure */
     files_init();
 



More information about the Syslinux-commits mailing list