diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2005-11-21 22:51:16 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2005-11-21 22:51:16 +0000 |
commit | 570800eb929716415e5ae5f27fd7662a11237c1f (patch) | |
tree | f8b5d3b47fc5edbba861da56a1d801bfb4a719e9 /sbin/mount_nullfs | |
parent | 24b2bdf920a0c67227a700ae26286366e99a8c15 (diff) | |
download | FreeBSD-src-570800eb929716415e5ae5f27fd7662a11237c1f.zip FreeBSD-src-570800eb929716415e5ae5f27fd7662a11237c1f.tar.gz |
Bring mount_nullfs up to WARNS=6.
Diffstat (limited to 'sbin/mount_nullfs')
-rw-r--r-- | sbin/mount_nullfs/Makefile | 2 | ||||
-rw-r--r-- | sbin/mount_nullfs/mount_nullfs.c | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sbin/mount_nullfs/Makefile b/sbin/mount_nullfs/Makefile index 9a6be28..5e92c5b 100644 --- a/sbin/mount_nullfs/Makefile +++ b/sbin/mount_nullfs/Makefile @@ -7,7 +7,7 @@ MAN= mount_nullfs.8 MOUNT= ${.CURDIR}/../mount CFLAGS+=-I${MOUNT} -WARNS?= 0 +WARNS?= 6 .PATH: ${MOUNT} diff --git a/sbin/mount_nullfs/mount_nullfs.c b/sbin/mount_nullfs/mount_nullfs.c index 4105624..a0ad5f6 100644 --- a/sbin/mount_nullfs/mount_nullfs.c +++ b/sbin/mount_nullfs/mount_nullfs.c @@ -66,9 +66,7 @@ int subdir(const char *, const char *); static void usage(void) __dead2; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct iovec iov[6]; int ch, mntflags; @@ -99,15 +97,15 @@ main(argc, argv) errx(EX_USAGE, "%s (%s) and %s are not distinct paths", argv[0], target, argv[1]); - iov[0].iov_base = "fstype"; + iov[0].iov_base = strdup("fstype"); iov[0].iov_len = sizeof("fstype"); - iov[1].iov_base = "nullfs"; + iov[1].iov_base = strdup("nullfs"); iov[1].iov_len = strlen(iov[1].iov_base) + 1; - iov[2].iov_base = "fspath"; + iov[2].iov_base = strdup("fspath"); iov[2].iov_len = sizeof("fspath"); iov[3].iov_base = source; iov[3].iov_len = strlen(source) + 1; - iov[4].iov_base = "target"; + iov[4].iov_base = strdup("target"); iov[4].iov_len = sizeof("target"); iov[5].iov_base = target; iov[5].iov_len = strlen(target) + 1; |