summaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-29 22:51:44 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-29 22:51:44 +0000
commit06c0a71d2315756db874e98bc4f760ca3283b6a6 (patch)
treedf385c84041f3fd8328e7a50caef4495ef2734a8 /util-linux/mount.c
parentb6aae0f38194cd39960a898606ee65d4be93a895 (diff)
downloadbusybox-w32-06c0a71d2315756db874e98bc4f760ca3283b6a6.tar.gz
busybox-w32-06c0a71d2315756db874e98bc4f760ca3283b6a6.tar.bz2
busybox-w32-06c0a71d2315756db874e98bc4f760ca3283b6a6.zip
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 ee45f01a6..ba98519b6 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -64,7 +64,7 @@ enum {
64 * flags */ 64 * flags */
65 65
66struct { 66struct {
67 char *name; 67 const char *name;
68 long flags; 68 long flags;
69} static mount_options[] = { 69} static mount_options[] = {
70 // MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs. 70 // MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs.
@@ -122,7 +122,7 @@ struct {
122#define VECTOR_SIZE(v) (sizeof(v) / sizeof((v)[0])) 122#define VECTOR_SIZE(v) (sizeof(v) / sizeof((v)[0]))
123 123
124/* Append mount options to string */ 124/* Append mount options to string */
125static void append_mount_options(char **oldopts, char *newopts) 125static void append_mount_options(char **oldopts, const char *newopts)
126{ 126{
127 if (*oldopts && **oldopts) { 127 if (*oldopts && **oldopts) {
128 /* do not insert options which are already there */ 128 /* do not insert options which are already there */
@@ -303,7 +303,7 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
303 fsname = 0; 303 fsname = 0;
304 if (!mp->mnt_type || !*mp->mnt_type) { /* bind mount */ 304 if (!mp->mnt_type || !*mp->mnt_type) { /* bind mount */
305 mp->mnt_fsname = fsname = bb_simplify_path(mp->mnt_fsname); 305 mp->mnt_fsname = fsname = bb_simplify_path(mp->mnt_fsname);
306 mp->mnt_type = "bind"; 306 mp->mnt_type = (char*)"bind";
307 } 307 }
308 mp->mnt_freq = mp->mnt_passno = 0; 308 mp->mnt_freq = mp->mnt_passno = 0;
309 309
@@ -1342,7 +1342,7 @@ prepare_kernel_data:
1342 1342
1343do_mount: /* perform actual mount */ 1343do_mount: /* perform actual mount */
1344 1344
1345 mp->mnt_type = "nfs"; 1345 mp->mnt_type = (char*)"nfs";
1346 retval = mount_it_now(mp, vfsflags, (char*)&data); 1346 retval = mount_it_now(mp, vfsflags, (char*)&data);
1347 goto ret; 1347 goto ret;
1348 1348
@@ -1428,7 +1428,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
1428 // lock is required 1428 // lock is required
1429 vfsflags |= MS_MANDLOCK; 1429 vfsflags |= MS_MANDLOCK;
1430 1430
1431 mp->mnt_type = "cifs"; 1431 mp->mnt_type = (char*)"cifs";
1432 rc = mount_it_now(mp, vfsflags, filteropts); 1432 rc = mount_it_now(mp, vfsflags, filteropts);
1433 if (ENABLE_FEATURE_CLEAN_UP) free(mp->mnt_fsname); 1433 if (ENABLE_FEATURE_CLEAN_UP) free(mp->mnt_fsname);
1434 goto report_error; 1434 goto report_error;