mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Teresa Remmet <t.remmet@phytec.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: Transferring files over tftp
Date: Thu, 29 Nov 2018 09:14:09 +0100	[thread overview]
Message-ID: <1543479249.18108.4.camel@phytec.de> (raw)
In-Reply-To: <20181116073206.3773odofpb2xxnbl@pengutronix.de>

Hello Sascha,

Am Freitag, den 16.11.2018, 08:32 +0100 schrieb Sascha Hauer:

...

> 
> --------------------------------------8<-----------------------------
> -----
> 
> From bf3de3391c958c9c44fcfa54b2c1a6a29e68a5a4 Mon Sep 17 00:00:00
> 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Fri, 16 Nov 2018 08:24:06 +0100
> Subject: [PATCH] fs: tftp: Make filesize a 64bit type
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

I miss this patch on next. As it fixes my problem. Is there any reason
why it is not applied?

Thanks,
Teresa

> ---
>  fs/tftp.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/tftp.c b/fs/tftp.c
> index 0d9ee6effd..8131ab27b3 100644
> --- a/fs/tftp.c
> +++ b/fs/tftp.c
> @@ -80,7 +80,7 @@ struct file_priv {
>  	int state;
>  	int err;
>  	char *filename;
> -	int filesize;
> +	loff_t filesize;
>  	uint64_t resend_timeout;
>  	uint64_t progress_timeout;
>  	struct kfifo *fifo;
> @@ -136,7 +136,7 @@ static int tftp_send(struct file_priv *priv)
>  				"timeout%c"
>  				"%d%c"
>  				"tsize%c"
> -				"%d%c"
> +				"%lld%c"
>  				"blksize%c"
>  				"1432",
>  				priv->filename + 1, 0,
> @@ -235,7 +235,7 @@ static void tftp_parse_oack(struct file_priv
> *priv, unsigned char *pkt, int len)
>  		if (val > s + len)
>  			return;
>  		if (!strcmp(opt, "tsize"))
> -			priv->filesize = simple_strtoul(val, NULL,
> 10);
> +			priv->filesize = simple_strtoull(val, NULL,
> 10);
>  		if (!strcmp(opt, "blksize"))
>  			priv->blocksize = simple_strtoul(val, NULL,
> 10);
>  		pr_debug("OACK opt: %s val: %s\n", opt, val);
> @@ -658,7 +658,7 @@ static struct dentry *tftp_lookup(struct inode
> *dir, struct dentry *dentry,
>  	struct fs_device_d *fsdev = container_of(sb, struct
> fs_device_d, sb);
>  	struct inode *inode;
>  	struct file_priv *priv;
> -	int filesize;
> +	loff_t filesize;
>  
>  	priv = tftp_do_open(&fsdev->dev, O_RDONLY, dentry);
>  	if (IS_ERR(priv))
> -- 
> 2.19.1
> 
> 

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-11-29  8:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 15:24 Teresa Remmet
2018-11-16  7:32 ` Sascha Hauer
2018-11-20 13:46   ` Teresa Remmet
2018-11-29  8:14   ` Teresa Remmet [this message]
2018-11-29 11:02     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1543479249.18108.4.camel@phytec.de \
    --to=t.remmet@phytec.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox