aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/e2p/mntopts.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-20 11:17:48 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-20 11:17:48 +0000
commit1f0262bcdb352e9a75a4e5f48cd63d05714e2859 (patch)
treee191e1f4019e7b0daf47f9077e375588f77b3c6a /e2fsprogs/e2p/mntopts.c
parent0fa9deda1706b19e5f42ed392483a582880aaca3 (diff)
downloadbusybox-1f0262bcdb352e9a75a4e5f48cd63d05714e2859.tar.gz
another more const
Diffstat (limited to 'e2fsprogs/e2p/mntopts.c')
-rw-r--r--e2fsprogs/e2p/mntopts.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/e2fsprogs/e2p/mntopts.c b/e2fsprogs/e2p/mntopts.c
index 735260ce0..562a9ccc1 100644
--- a/e2fsprogs/e2p/mntopts.c
+++ b/e2fsprogs/e2p/mntopts.c
@@ -21,7 +21,7 @@ struct mntopt {
const char *string;
};
-static struct mntopt mntopt_list[] = {
+static const struct mntopt mntopt_list[] = {
{ EXT2_DEFM_DEBUG, "debug" },
{ EXT2_DEFM_BSDGROUPS, "bsdgroups" },
{ EXT2_DEFM_XATTR_USER, "user_xattr" },
@@ -35,7 +35,7 @@ static struct mntopt mntopt_list[] = {
const char *e2p_mntopt2string(unsigned int mask)
{
- struct mntopt *f;
+ const struct mntopt *f;
static char buf[20];
int fnum;
@@ -50,7 +50,7 @@ const char *e2p_mntopt2string(unsigned int mask)
int e2p_string2mntopt(char *string, unsigned int *mask)
{
- struct mntopt *f;
+ const struct mntopt *f;
char *eptr;
int num;
@@ -99,8 +99,7 @@ int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok)
int neg;
unsigned int mask;
- buf = xmalloc(strlen(str)+1);
- strcpy(buf, str);
+ buf = bb_xstrdup(str);
cp = buf;
while (cp && *cp) {
neg = 0;