From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/4] environment: constify arguments
Date: Thu, 20 Feb 2014 14:49:27 +0100 [thread overview]
Message-ID: <1392904169-786-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1392904169-786-1-git-send-email-s.hauer@pengutronix.de>
The directory arguments to envfs_load and envfs_save can
be const.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/environment.c | 4 ++--
include/envfs.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/common/environment.c b/common/environment.c
index 6f06bfc..695baf7 100644
--- a/common/environment.c
+++ b/common/environment.c
@@ -162,7 +162,7 @@ out:
* Note: This function will also be used on the host! See note in the header
* of this file.
*/
-int envfs_save(const char *filename, char *dirname)
+int envfs_save(const char *filename, const char *dirname)
{
struct envfs_super *super;
int envfd, size, ret;
@@ -227,7 +227,7 @@ EXPORT_SYMBOL(envfs_save);
* Note: This function will also be used on the host! See note in the header
* of this file.
*/
-int envfs_load(const char *filename, char *dir, unsigned flags)
+int envfs_load(const char *filename, const char *dir, unsigned flags)
{
struct envfs_super super;
void *buf = NULL, *buf_free = NULL;
diff --git a/include/envfs.h b/include/envfs.h
index f8b24ed..94d1353 100644
--- a/include/envfs.h
+++ b/include/envfs.h
@@ -90,8 +90,8 @@ struct envfs_super {
#endif
#define ENV_FLAG_NO_OVERWRITE (1 << 0)
-int envfs_load(const char *filename, char *dirname, unsigned flags);
-int envfs_save(const char *filename, char *dirname);
+int envfs_load(const char *filename, const char *dirname, unsigned flags);
+int envfs_save(const char *filename, const char *dirname);
/* defaults to /dev/env0 */
#ifdef CONFIG_ENV_HANDLING
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-02-20 13:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 13:49 [PATCH 1/4] filetype: Add detection for barebox environment Sascha Hauer
2014-02-20 13:49 ` Sascha Hauer [this message]
2014-02-20 13:49 ` [PATCH 3/4] environment: Add function to load envfs from buffer Sascha Hauer
2014-02-20 15:16 ` Alexander Aring
2014-02-22 18:28 ` Sascha Hauer
2014-02-22 19:40 ` Alexander Aring
2014-02-20 13:49 ` [PATCH 4/4] defaultenv: Align defaultenv array 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=1392904169-786-2-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@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