* [PATCH] scripts: constify wirte_full input buffer
@ 2022-03-18 14:49 Ahmad Fatoum
2022-03-28 8:56 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2022-03-18 14:49 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
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(-)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] scripts: constify wirte_full input buffer
2022-03-18 14:49 [PATCH] scripts: constify wirte_full input buffer Ahmad Fatoum
@ 2022-03-28 8:56 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2022-03-28 8:56 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-28 8:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 14:49 [PATCH] scripts: constify wirte_full input buffer Ahmad Fatoum
2022-03-28 8:56 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox