diff options
author | phk <phk@FreeBSD.org> | 2001-11-02 09:23:34 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2001-11-02 09:23:34 +0000 |
commit | 96b92e67264521fc24556e40bed6f64edbab1379 (patch) | |
tree | 4a8e6e3caadb7054520eea9d1b324a8c011e40e8 /sbin/newfs/newfs.c | |
parent | 558e29c5a0ae66dc14467414542d2daeaa572d78 (diff) | |
download | FreeBSD-src-96b92e67264521fc24556e40bed6f64edbab1379.zip FreeBSD-src-96b92e67264521fc24556e40bed6f64edbab1379.tar.gz |
style(9) cleanup.
Submitted by: j mckitrick <jcm@freebsd-uk.eu.org>
Reviewed by: phk, /sbin/md5
Diffstat (limited to 'sbin/newfs/newfs.c')
-rw-r--r-- | sbin/newfs/newfs.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index c122a2e..d0917a1 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -318,7 +318,8 @@ main(argc, argv) else if (strcmp(optarg, "time") == 0) opt = FS_OPTTIME; else - fatal("%s: unknown optimization preference: use `space' or `time'", optarg); + fatal("%s: unknown optimization preference: " + "use `space' or `time'", optarg); break; case 'p': if ((trackspares = atoi(optarg)) < 0) @@ -367,12 +368,13 @@ main(argc, argv) /* * No path prefix; try /dev/%s. */ - (void)snprintf(device, sizeof(device), "%s%s", _PATH_DEV, special); + (void)snprintf(device, sizeof(device), + "%s%s", _PATH_DEV, special); special = device; } - if (Nflag) { + if (Nflag) fso = -1; - } else { + else { fso = open(special, O_WRONLY); if (fso < 0) fatal("%s: %s", special, strerror(errno)); @@ -428,12 +430,12 @@ main(argc, argv) argv[0], *cp); if (pp->p_fstype == FS_BOOT) fatal("%s: `%c' partition overlaps boot program", - argv[0], *cp); + argv[0], *cp); if (fssize == 0) fssize = pp->p_size; if (fssize > pp->p_size) - fatal("%s: maximum file system size on the `%c' partition is %d", - argv[0], *cp, pp->p_size); + fatal("%s: maximum file system size on the " + "`%c' partition is %d", argv[0], *cp, pp->p_size); if (rpm == 0) { rpm = lp->d_rpm; if (rpm <= 0) @@ -508,8 +510,8 @@ main(argc, argv) */ if (t_or_u_flag && secpercyl != lp->d_secpercyl) fprintf(stderr, "%s (%d) %s (%lu)\n", - "Warning: calculated sectors per cylinder", secpercyl, - "disagrees with disk label", (u_long)lp->d_secpercyl); + "Warning: calculated sectors per cylinder", secpercyl, + "disagrees with disk label", (u_long)lp->d_secpercyl); if (maxbpg == 0) maxbpg = MAXBLKPG(bsize); headswitch = lp->d_headswitch; @@ -630,9 +632,8 @@ fatal(fmt, va_alist) openlog(progname, LOG_CONS, LOG_DAEMON); vsyslog(LOG_ERR, fmt, ap); closelog(); - } else { + } else vwarnx(fmt, ap); - } va_end(ap); exit(1); /*NOTREACHED*/ |