summaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-01-29 22:51:44 +0000
committerDenis Vlasenko2007-01-29 22:51:44 +0000
commit06c0a71d2315756db874e98bc4f760ca3283b6a6 (patch)
treedf385c84041f3fd8328e7a50caef4495ef2734a8 /util-linux/mount.c
parentb6aae0f38194cd39960a898606ee65d4be93a895 (diff)
downloadbusybox-06c0a71d2315756db874e98bc4f760ca3283b6a6.zip
busybox-06c0a71d2315756db874e98bc4f760ca3283b6a6.tar.gz
preparatory patch for -Wwrite-strings #3
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r--util-linux/mount.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index ee45f01..ba98519 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -64,7 +64,7 @@ enum {
* flags */
struct {
- char *name;
+ const char *name;
long flags;
} static mount_options[] = {
// MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs.
@@ -122,7 +122,7 @@ struct {
#define VECTOR_SIZE(v) (sizeof(v) / sizeof((v)[0]))
/* Append mount options to string */
-static void append_mount_options(char **oldopts, char *newopts)
+static void append_mount_options(char **oldopts, const char *newopts)
{
if (*oldopts && **oldopts) {
/* do not insert options which are already there */
@@ -303,7 +303,7 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
fsname = 0;
if (!mp->mnt_type || !*mp->mnt_type) { /* bind mount */
mp->mnt_fsname = fsname = bb_simplify_path(mp->mnt_fsname);
- mp->mnt_type = "bind";
+ mp->mnt_type = (char*)"bind";
}
mp->mnt_freq = mp->mnt_passno = 0;
@@ -1342,7 +1342,7 @@ prepare_kernel_data:
do_mount: /* perform actual mount */
- mp->mnt_type = "nfs";
+ mp->mnt_type = (char*)"nfs";
retval = mount_it_now(mp, vfsflags, (char*)&data);
goto ret;
@@ -1428,7 +1428,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
// lock is required
vfsflags |= MS_MANDLOCK;
- mp->mnt_type = "cifs";
+ mp->mnt_type = (char*)"cifs";
rc = mount_it_now(mp, vfsflags, filteropts);
if (ENABLE_FEATURE_CLEAN_UP) free(mp->mnt_fsname);
goto report_error;