Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/mbrlabel Be more static.
details: https://anonhg.NetBSD.org/src/rev/9925b2852112
branches: trunk
changeset: 768806:9925b2852112
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Aug 27 17:45:30 2011 +0000
description:
Be more static.
diffstat:
sbin/mbrlabel/mbrlabel.c | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
diffs (88 lines):
diff -r 56e196c0b7a7 -r 9925b2852112 sbin/mbrlabel/mbrlabel.c
--- a/sbin/mbrlabel/mbrlabel.c Sat Aug 27 17:43:42 2011 +0000
+++ b/sbin/mbrlabel/mbrlabel.c Sat Aug 27 17:45:30 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mbrlabel.c,v 1.26 2005/12/28 06:03:15 christos Exp $ */
+/* $NetBSD: mbrlabel.c,v 1.27 2011/08/27 17:45:30 joerg Exp $ */
/*
* Copyright (C) 1998 Wolfgang Solfrank.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mbrlabel.c,v 1.26 2005/12/28 06:03:15 christos Exp $");
+__RCSID("$NetBSD: mbrlabel.c,v 1.27 2011/08/27 17:45:30 joerg Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -55,17 +55,16 @@
#include "dkcksum.h"
#include "extern.h"
-int main(int, char **);
-void usage(void);
-void getlabel(int);
-void setlabel(int, int);
-int getparts(int, u_int32_t, u_int32_t, int);
-u_int16_t getshort(void *);
-u_int32_t getlong(void *);
+__dead static void usage(void);
+static void getlabel(int);
+static void setlabel(int, int);
+static int getparts(int, u_int32_t, u_int32_t, int);
+static u_int16_t getshort(void *);
+static u_int32_t getlong(void *);
struct disklabel label;
-void
+static void
getlabel(int sd)
{
@@ -81,7 +80,7 @@
label.d_npartitions = getrawpartition() + 1;
}
-void
+static void
setlabel(int sd, int doraw)
{
int one = 1;
@@ -98,7 +97,7 @@
}
-u_int16_t
+static u_int16_t
getshort(void *p)
{
unsigned char *cp = p;
@@ -106,7 +105,7 @@
return (cp[0] | (cp[1] << 8));
}
-u_int32_t
+static u_int32_t
getlong(void *p)
{
unsigned char *cp = p;
@@ -114,7 +113,7 @@
return (cp[0] | (cp[1] << 8) | (cp[2] << 16) | (cp[3] << 24));
}
-int
+static int
getparts(int sd, u_int32_t off, u_int32_t extoff, int verbose)
{
unsigned char buf[DEV_BSIZE];
@@ -237,7 +236,7 @@
return (changed);
}
-void
+static void
usage(void)
{
fprintf(stderr, "usage: %s [-fqrw] [-s sector] rawdisk\n",
Home |
Main Index |
Thread Index |
Old Index