summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1998-06-04 06:41:26 +0000
committercharnier <charnier@FreeBSD.org>1998-06-04 06:41:26 +0000
commit74e9afca63d14aec311117ed6198d6ce5cb7e152 (patch)
tree8e00f1973a60ed0346fce8d29f92bcd506a388fc
parent65791359e874dca192d08d40eec1d2b51a757e9d (diff)
downloadFreeBSD-src-74e9afca63d14aec311117ed6198d6ce5cb7e152.zip
FreeBSD-src-74e9afca63d14aec311117ed6198d6ce5cb7e152.tar.gz
Correct use of .Nm, use .Bl/.El in FILES section. Add rcsid. Remove unused
#includes and make it a little more -Wall-friendly.
-rw-r--r--sbin/ccdconfig/ccdconfig.823
-rw-r--r--sbin/ccdconfig/ccdconfig.c17
2 files changed, 22 insertions, 18 deletions
diff --git a/sbin/ccdconfig/ccdconfig.8 b/sbin/ccdconfig/ccdconfig.8
index 3dfe787..16974e3 100644
--- a/sbin/ccdconfig/ccdconfig.8
+++ b/sbin/ccdconfig/ccdconfig.8
@@ -12,7 +12,7 @@
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
+.\" must display the following acknowledgment:
.\" This product includes software developed for the NetBSD Project
.\" by Jason R. Thorpe.
.\" 4. The name of the author may not be used to endorse or promote products
@@ -30,6 +30,8 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
+.\" $Id$
+.\"
.Dd July 17, 1995
.Dt CCDCONFIG 8
.Os FreeBSD
@@ -43,7 +45,7 @@
.Ar ileave
.Op Ar flags
.Ar dev
-.Op Ar ...
+.Op Ar
.Nm ccdconfig
.Fl C
.Op Fl v
@@ -52,7 +54,7 @@
.Fl u
.Op Fl v
.Ar ccd
-.Op Ar ...
+.Op Ar
.Nm ccdconfig
.Fl U
.Op Fl v
@@ -75,7 +77,7 @@ The options are as follows:
.Bl -tag -width indent
.It Fl c
Configure a ccd. This is the default behavior of
-.Nm ccdconfig .
+.Nm Ns .
.It Fl C
Configure all ccd devices listed in the ccd configuration file.
.It Fl f Ar config_file
@@ -102,8 +104,8 @@ Unconfigure a ccd.
.It Fl U
Unconfigure all ccd devices listed the ccd configuration file.
.It Fl v
-Causes
-.Nm ccdconfig
+Cause
+.Nm
to be verbose.
.El
.Pp
@@ -145,12 +147,15 @@ interleave factor of 32 blocks.
.Ed
.Pp
.Sh FILES
-/etc/ccd.conf - default ccd configuration file.
+.Bl -tag -width /etc/ccd.conf -compact
+.It Pa /etc/ccd.conf
+default ccd configuration file
+.El
.Sh SEE ALSO
.Xr ccd 4 ,
-.Xr rc 8 .
+.Xr rc 8
.Sh HISTORY
The
-.Nm ccdconfig
+.Nm
command first appeared in
.Nx 1.0a .
diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c
index 4d18a9c..5cbb77e 100644
--- a/sbin/ccdconfig/ccdconfig.c
+++ b/sbin/ccdconfig/ccdconfig.c
@@ -1,5 +1,3 @@
-/* $Id: ccdconfig.c,v 1.7 1997/06/10 11:04:50 charnier Exp $ */
-
/* $NetBSD: ccdconfig.c,v 1.2.2.1 1995/11/11 02:43:35 thorpej Exp $ */
/*
@@ -34,20 +32,22 @@
* SUCH DAMAGE.
*/
+#ifndef lint
+static const char rcsid[] =
+ "$Id$";
+#endif /* not lint */
+
#include <sys/param.h>
-#include <sys/ioctl.h>
#include <sys/disklabel.h>
#include <sys/device.h>
#include <sys/disk.h>
#include <sys/stat.h>
-#include <sys/sysctl.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <kvm.h>
#include <limits.h>
-#include <nlist.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -97,7 +97,6 @@ static int dump_ccd __P((int, char **));
static int getmaxpartitions __P((void));
static int getrawpartition __P((void));
static int flags_to_val __P((char *));
-static int pathtodevt __P((char *, dev_t *));
static void print_ccd_info __P((struct ccd_softc *, kvm_t *));
static char *resolve_ccdname __P((char *));
static void usage __P((void));
@@ -186,6 +185,7 @@ main(argc, argv)
/* NOTREACHED */
}
/* NOTREACHED */
+ return (0);
}
static int
@@ -196,7 +196,7 @@ do_single(argc, argv, action)
{
struct ccd_ioctl ccio;
char *ccd, *cp, *cp2, **disks;
- int noflags = 0, i, ileave, flags, j, error;
+ int noflags = 0, i, ileave, flags, j;
bzero(&ccio, sizeof(ccio));
@@ -393,7 +393,6 @@ pathtounit(path, unitp)
int *unitp;
{
struct stat st;
- dev_t dev;
int maxpartitions;
if (stat(path, &st) != 0)
@@ -414,7 +413,7 @@ static char *
resolve_ccdname(name)
char *name;
{
- char c, *cp, *path;
+ char c, *path;
size_t len, newlen;
int rawpart;
OpenPOWER on IntegriCloud