From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] scripts: constify wirte_full input buffer
Date: Mon, 28 Mar 2022 10:56:04 +0200 [thread overview]
Message-ID: <20220328085604.GM12181@pengutronix.de> (raw)
In-Reply-To: <20220318144924.497993-1-a.fatoum@pengutronix.de>
On Fri, Mar 18, 2022 at 03:49:24PM +0100, Ahmad Fatoum wrote:
> Buffer written is read-only, so align prototype with <libfile.h>.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> scripts/common.c | 2 +-
> scripts/common.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Applied with s/wirte_full/write_full/, thanks
Sascha
>
> diff --git a/scripts/common.c b/scripts/common.c
> index 2be41615ea9e..0eb263d041a5 100644
> --- a/scripts/common.c
> +++ b/scripts/common.c
> @@ -148,7 +148,7 @@ int read_full(int fd, void *buf, size_t size)
> return insize;
> }
>
> -int write_full(int fd, void *buf, size_t size)
> +int write_full(int fd, const void *buf, size_t size)
> {
> size_t insize = size;
> int now;
> diff --git a/scripts/common.h b/scripts/common.h
> index 820108c52c2d..399729c338f3 100644
> --- a/scripts/common.h
> +++ b/scripts/common.h
> @@ -5,6 +5,6 @@ int read_file_2(const char *filename, size_t *size, void **outbuf, size_t max_si
> void *read_file(const char *filename, size_t *size);
> int write_file(const char *filename, const void *buf, size_t size);
> int read_full(int fd, void *buf, size_t size);
> -int write_full(int fd, void *buf, size_t size);
> +int write_full(int fd, const void *buf, size_t size);
>
> #endif /* __COMMON_H */
> --
> 2.30.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2022-03-28 8:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 14:49 Ahmad Fatoum
2022-03-28 8:56 ` Sascha Hauer [this message]
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=20220328085604.GM12181@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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