From: Sascha Hauer <s.hauer@pengutronix.de>
To: Herve Codina <herve.codina@celad.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/1] passwd: Support passwd file custom directory
Date: Thu, 3 Jul 2014 08:54:22 +0200 [thread overview]
Message-ID: <20140703065422.GO14257@pengutronix.de> (raw)
In-Reply-To: <53B3AA88.10906@celad.com>
On Wed, Jul 02, 2014 at 08:45:28AM +0200, Herve Codina wrote:
> Hi,
>
> I haven't got any news about this patch.
> Has it been reviewed ?
>
> I hope it was not lost in the flow of other patches.
> If so, i can resend it.
Sorry, I have seen it but then forgot to write an answer.
> > diff --git a/include/password.h b/include/password.h
> > index 0dd1054..9d84685 100644
> > --- a/include/password.h
> > +++ b/include/password.h
> > @@ -18,8 +18,14 @@
> > #ifndef __PASSWORD_H__
> > #define __PASSWORD_H__
> >
> > -#define PASSWD_FILE "/env/etc/passwd"
> > -#define PASSWD_DIR "/env/etc/"
> > +#ifdef CONFIG_PASSWORD_DIR
> > +#define PASSWD_DIR CONFIG_PASSWORD_DIR
> > +#else
> > +#define PASSWD_DIR "/env/etc"
> > +#endif
> > +
> > +#define PASSWD_FILE PASSWD_DIR"/passwd"
I don't like this ifdeffery. If you want to have this configurable
please make a
static char *passwd_file = "/env/etc/passwd"
int set_passwd_file(const char *file)
{
passwd_file = file;
}
And call it from your board code.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 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
next prev parent reply other threads:[~2014-07-03 6:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 9:07 Herve Codina
2014-07-02 6:45 ` Herve Codina
2014-07-03 6:54 ` Sascha Hauer [this message]
2014-07-03 6:57 ` Jean-Christophe PLAGNIOL-VILLARD
2014-07-03 7:36 ` Herve Codina
2014-07-03 10:19 ` Jean-Christophe PLAGNIOL-VILLARD
2014-07-03 11:09 ` Herve Codina
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=20140703065422.GO14257@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=herve.codina@celad.com \
/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