diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2022-08-30 09:38:02 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-08-31 08:31:21 +0200 |
commit | cc6c1edd0100d4dd72d1780acb616556a56450a0 (patch) | |
tree | 3c9a7ba5f262fb1b003c75596d0113ff8464147c /fs | |
parent | 414945e29912b47e44a121239501f88569fa0e38 (diff) | |
download | barebox-cc6c1edd0100d4dd72d1780acb616556a56450a0.tar.gz |
tftp: replace hardcoded blksize by global constant
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Link: https://lore.barebox.org/20220830073816.2694734-8-enrico.scholz@sigma-chemnitz.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/tftp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -65,6 +65,7 @@ #define STATE_DONE 8 #define TFTP_BLOCK_SIZE 512 /* default TFTP block size */ +#define TFTP_MTU_SIZE 1432 /* MTU based block size */ #define TFTP_FIFO_SIZE 4096 #define TFTP_ERR_RESEND 1 @@ -133,12 +134,13 @@ static int tftp_send(struct file_priv *priv) "timeout%c" "%d%c" "blksize%c" - "1432", + "%u", priv->filename + 1, '\0', '\0', /* "octet" */ '\0', /* "timeout" */ TIMEOUT, '\0', - '\0'); /* "blksize" */ + '\0', /* "blksize" */ + TFTP_MTU_SIZE); pkt++; if (!priv->push) |