summaryrefslogtreecommitdiffstats
path: root/sbin/newlfs/newfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/newlfs/newfs.c')
-rw-r--r--sbin/newlfs/newfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sbin/newlfs/newfs.c b/sbin/newlfs/newfs.c
index 4f8e72d..953c958 100644
--- a/sbin/newlfs/newfs.c
+++ b/sbin/newlfs/newfs.c
@@ -38,7 +38,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)newfs.c 8.3 (Berkeley) 4/22/94";
+static char sccsid[] = "@(#)newfs.c 8.5 (Berkeley) 5/24/95";
#endif /* not lint */
/*
@@ -127,7 +127,7 @@ main(argc, argv)
int debug, lfs, fsi, fso, segsize;
char *cp, *opstring;
- if (progname = rindex(*argv, '/'))
+ if (progname = strrchr(*argv, '/'))
++progname;
else
progname = *argv;
@@ -269,7 +269,7 @@ main(argc, argv)
* prefix, try /dev/r%s and then /dev/%s.
*/
special = argv[0];
- if (index(special, '/') == NULL) {
+ if (strchr(special, '/') == NULL) {
(void)sprintf(device, "%sr%s", _PATH_DEV, special);
if (stat(device, &st) == -1)
(void)sprintf(device, "%s%s", _PATH_DEV, special);
@@ -293,7 +293,7 @@ main(argc, argv)
if (!debug && !mfs && !S_ISCHR(st.st_mode))
(void)printf("%s: %s: not a character-special device\n",
progname, special);
- cp = index(argv[0], '\0') - 1;
+ cp = strchr(argv[0], '\0') - 1;
if (!debug && (cp == 0 || (*cp < 'a' || *cp > 'h') && !isdigit(*cp)))
fatal("%s: can't figure out file system partition", argv[0]);
@@ -331,7 +331,7 @@ main(argc, argv)
}
/* If we're making a LFS, we break out here */
- exit(make_lfs(fso, lp, pp, minfree, bsize, segsize));
+ exit(make_lfs(fso, lp, pp, minfree, bsize, fsize, segsize));
}
#ifdef COMPAT
@@ -418,7 +418,7 @@ rewritelabel(s, fd, lp)
cfd = open(specname, O_WRONLY);
if (cfd < 0)
fatal("%s: %s", specname, strerror(errno));
- bzero(blk, sizeof(blk));
+ memset(blk, 0, sizeof(blk));
*(struct disklabel *)(blk + LABELOFFSET) = *lp;
alt = lp->d_ncylinders * lp->d_secpercyl - lp->d_nsectors;
for (i = 1; i < 11 && i < lp->d_nsectors; i += 2) {
OpenPOWER on IntegriCloud