aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/e2p/mntopts.c
diff options
context:
space:
mode:
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 {
21 const char *string; 21 const char *string;
22}; 22};
23 23
24static struct mntopt mntopt_list[] = { 24static const struct mntopt mntopt_list[] = {
25 { EXT2_DEFM_DEBUG, "debug" }, 25 { EXT2_DEFM_DEBUG, "debug" },
26 { EXT2_DEFM_BSDGROUPS, "bsdgroups" }, 26 { EXT2_DEFM_BSDGROUPS, "bsdgroups" },
27 { EXT2_DEFM_XATTR_USER, "user_xattr" }, 27 { EXT2_DEFM_XATTR_USER, "user_xattr" },
@@ -35,7 +35,7 @@ static struct mntopt mntopt_list[] = {
35 35
36const char *e2p_mntopt2string(unsigned int mask) 36const char *e2p_mntopt2string(unsigned int mask)
37{ 37{
38 struct mntopt *f; 38 const struct mntopt *f;
39 static char buf[20]; 39 static char buf[20];
40 int fnum; 40 int fnum;
41 41
@@ -50,7 +50,7 @@ const char *e2p_mntopt2string(unsigned int mask)
50 50
51int e2p_string2mntopt(char *string, unsigned int *mask) 51int e2p_string2mntopt(char *string, unsigned int *mask)
52{ 52{
53 struct mntopt *f; 53 const struct mntopt *f;
54 char *eptr; 54 char *eptr;
55 int num; 55 int num;
56 56
@@ -99,8 +99,7 @@ int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok)
99 int neg; 99 int neg;
100 unsigned int mask; 100 unsigned int mask;
101 101
102 buf = xmalloc(strlen(str)+1); 102 buf = bb_xstrdup(str);
103 strcpy(buf, str);
104 cp = buf; 103 cp = buf;
105 while (cp && *cp) { 104 while (cp && *cp) {
106 neg = 0; 105 neg = 0;