Sat Aug 27 16:43:07 2011 UTC ()
Mark usage as static and dead.


(joerg)
diff -r1.2 -r1.3 src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c
diff -r1.2 -r1.3 src/sbin/dkscan_bsdlabel/dkscan_util.h

cvs diff -r1.2 -r1.3 src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c (expand / switch to unified diff)

--- src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c 2008/04/28 20:23:08 1.2
+++ src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c 2011/08/27 16:43:07 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: dkscan_bsdlabel.c,v 1.2 2008/04/28 20:23:08 martin Exp $ */ 1/* $NetBSD: dkscan_bsdlabel.c,v 1.3 2011/08/27 16:43:07 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 2007 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Martin Husemann <martin@NetBSD.org>. 8 * by Martin Husemann <martin@NetBSD.org>.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -33,26 +33,28 @@ @@ -33,26 +33,28 @@
33#include <stdlib.h> 33#include <stdlib.h>
34#include <stddef.h> 34#include <stddef.h>
35#include <string.h> 35#include <string.h>
36#include <unistd.h> 36#include <unistd.h>
37#include <fcntl.h> 37#include <fcntl.h>
38#include <err.h> 38#include <err.h>
39#include <util.h> 39#include <util.h>
40#include <sys/disk.h> 40#include <sys/disk.h>
41 41
42#include "dkscan_util.h" 42#include "dkscan_util.h"
43 43
44#include "dkwedge_bsdlabel.c" 44#include "dkwedge_bsdlabel.c"
45 45
 46__dead static void usage(void);
 47
46int 48int
47main(int argc, char **argv) 49main(int argc, char **argv)
48{ 50{
49 struct disk d; 51 struct disk d;
50 int ch; 52 int ch;
51 char buf[PATH_MAX]; 53 char buf[PATH_MAX];
52 const char *devpart; 54 const char *devpart;
53 55
54 if (argc < 2) 56 if (argc < 2)
55 usage(); 57 usage();
56 58
57 while ((ch = getopt(argc, argv, "nv")) != -1) { 59 while ((ch = getopt(argc, argv, "nv")) != -1) {
58 switch (ch) { 60 switch (ch) {

cvs diff -r1.2 -r1.3 src/sbin/dkscan_bsdlabel/dkscan_util.h (expand / switch to unified diff)

--- src/sbin/dkscan_bsdlabel/dkscan_util.h 2008/04/28 20:23:08 1.2
+++ src/sbin/dkscan_bsdlabel/dkscan_util.h 2011/08/27 16:43:07 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: dkscan_util.h,v 1.2 2008/04/28 20:23:08 martin Exp $ */ 1/* $NetBSD: dkscan_util.h,v 1.3 2011/08/27 16:43:07 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 2007 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Martin Husemann <martin@NetBSD.org>. 8 * by Martin Husemann <martin@NetBSD.org>.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -29,19 +29,17 @@ @@ -29,19 +29,17 @@
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 32
33#define BLOCK_SIZE 512 /* XXX */ 33#define BLOCK_SIZE 512 /* XXX */
34 34
35u_int dkcksum(struct disklabel *); 35u_int dkcksum(struct disklabel *);
36u_int dkcksum_sized(struct disklabel *, size_t); 36u_int dkcksum_sized(struct disklabel *, size_t);
37int dkwedge_read(struct disk *pdk, struct vnode *vp, daddr_t blkno, 37int dkwedge_read(struct disk *pdk, struct vnode *vp, daddr_t blkno,
38 void *tbuf, size_t len); 38 void *tbuf, size_t len);
39int dkwedge_add(struct dkwedge_info *dkw); 39int dkwedge_add(struct dkwedge_info *dkw);
40void aprint_error(const char *format, ...); 40void aprint_error(const char *format, ...);
41void aprint_verbose(const char *format, ...); 41void aprint_verbose(const char *format, ...);
42void usage(void); 
43 
44 42
45extern int verbose; /* are we verbose? */ 43extern int verbose; /* are we verbose? */
46extern int no_action; /* don't do anything, just print info */ 44extern int no_action; /* don't do anything, just print info */
47extern int disk_fd; /* file descriptor for disk access */ 45extern int disk_fd; /* file descriptor for disk access */