Libraries updates and cleanup
* Updating common/lib * Updating lib/csu * Updating lib/libc * Updating libexec/ld.elf_so * Corrected test on __minix in featuretest to actually follow the meaning of the comment. * Cleaned up _REENTRANT-related defintions. * Disabled -D_REENTRANT for libfetch * Removing some unneeded __NBSD_LIBC defines and tests Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: disklabel.c,v 1.34 2006/03/19 02:17:16 christos Exp $ */
|
||||
/* $NetBSD: disklabel.c,v 1.37 2012/06/25 22:32:43 abs Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1987, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 5/3/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: disklabel.c,v 1.34 2006/03/19 02:17:16 christos Exp $");
|
||||
__RCSID("$NetBSD: disklabel.c,v 1.37 2012/06/25 22:32:43 abs Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
@@ -71,15 +71,14 @@ __weak_alias(getdiskbyname,_getdiskbyname)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static void error __P((int));
|
||||
static void error(int);
|
||||
#endif
|
||||
static int gettype __P((char *, const char *const *));
|
||||
static int gettype(char *, const char *const *);
|
||||
|
||||
static const char *db_array[2] = { _PATH_DISKTAB, 0 };
|
||||
|
||||
int
|
||||
setdisktab(name)
|
||||
const char *name;
|
||||
setdisktab(const char *name)
|
||||
{
|
||||
if (!name || !*name)
|
||||
return -1;
|
||||
@@ -90,8 +89,7 @@ setdisktab(name)
|
||||
|
||||
|
||||
struct disklabel *
|
||||
getdiskbyname(name)
|
||||
const char *name;
|
||||
getdiskbyname(const char *name)
|
||||
{
|
||||
static struct disklabel disk;
|
||||
struct disklabel *dp = &disk;
|
||||
@@ -208,9 +206,7 @@ getdiskbyname(name)
|
||||
}
|
||||
|
||||
static int
|
||||
gettype(t, names)
|
||||
char *t;
|
||||
const char *const *names;
|
||||
gettype(char *t, const char *const *names)
|
||||
{
|
||||
const char *const *nm;
|
||||
|
||||
@@ -219,7 +215,7 @@ gettype(t, names)
|
||||
|
||||
for (nm = names; *nm; nm++)
|
||||
if (strcasecmp(t, *nm) == 0)
|
||||
return (nm - names);
|
||||
return (int)(nm - names);
|
||||
if (isdigit((unsigned char) *t))
|
||||
return (atoi(t));
|
||||
return (0);
|
||||
|
||||
Reference in New Issue
Block a user