pxe: set the block size in the fs structure
authorH. Peter Anvin <hpa@zytor.com>
Wed, 24 Feb 2010 03:09:44 +0000 (19:09 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 24 Feb 2010 03:09:44 +0000 (19:09 -0800)
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@zytor.com>
core/fs/pxe/pxe.c

index 56f8ee4..e58901d 100644 (file)
@@ -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();