summaryrefslogtreecommitdiff
path: root/usr.sbin/diskpart/diskpart.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-29 03:33:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-29 03:33:38 +0000
commit2706ad4a33922de7985e9a17d454f127404868e1 (patch)
tree59e9ea9a0cad49b079d589859fb039fc37ef0e59 /usr.sbin/diskpart/diskpart.c
parentbbbcbaca48dab4bf31ad4f6e12551f455a58e81d (diff)
fix warnings
Diffstat (limited to 'usr.sbin/diskpart/diskpart.c')
-rw-r--r--usr.sbin/diskpart/diskpart.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/usr.sbin/diskpart/diskpart.c b/usr.sbin/diskpart/diskpart.c
index 464fc688e4b..d5003aef574 100644
--- a/usr.sbin/diskpart/diskpart.c
+++ b/usr.sbin/diskpart/diskpart.c
@@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)diskpart.c 5.11 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: diskpart.c,v 1.2 1996/07/10 04:13:39 ccappuc Exp $";
+static char rcsid[] = "$Id: diskpart.c,v 1.3 1996/08/29 03:33:37 deraadt Exp $";
#endif /* not lint */
/*
@@ -111,6 +111,7 @@ int dflag; /* print disktab entry */
struct disklabel *promptfordisk();
+int
main(argc, argv)
int argc;
char *argv[];
@@ -444,20 +445,6 @@ again:
return (dp);
}
-gettype(t, names)
- char *t;
- char **names;
-{
- register char **nm;
-
- for (nm = names; *nm; nm++)
- if (ustrcmp(t, *nm) == 0)
- return (nm - names);
- if (isdigit(*t))
- return (atoi(t));
- return (-1);
-}
-
ustrcmp(s1, s2)
register char *s1, *s2;
{
@@ -473,3 +460,19 @@ ustrcmp(s1, s2)
}
return (0);
}
+
+int
+gettype(t, names)
+ char *t;
+ char **names;
+{
+ register char **nm;
+
+ for (nm = names; *nm; nm++)
+ if (ustrcmp(t, *nm) == 0)
+ return (nm - names);
+ if (isdigit(*t))
+ return (atoi(t));
+ return (-1);
+}
+