aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig/mdconfig.c
diff options
context:
space:
mode:
authorDima Dorfman <dd@FreeBSD.org>2001-06-21 02:10:26 +0000
committerDima Dorfman <dd@FreeBSD.org>2001-06-21 02:10:26 +0000
commitc894b25a2ffcd858ca64d12fc478c4ccbd9b0c81 (patch)
tree8d1ef80a8f6a0b3e2e2387bd0ba23dbfbaecd51f /sbin/mdconfig/mdconfig.c
parent78baea25b2982b7e696dbe01c15691c3360a68ff (diff)
downloadsrc-c894b25a2ffcd858ca64d12fc478c4ccbd9b0c81.tar.gz
src-c894b25a2ffcd858ca64d12fc478c4ccbd9b0c81.zip
Constify mdmaybeload(), add a prototype for usage(), and get rid of a
sizeof(int) == sizeof(long) assumption; clamp down with WARNS=2.
Notes
Notes: svn path=/head/; revision=78526
Diffstat (limited to 'sbin/mdconfig/mdconfig.c')
-rw-r--r--sbin/mdconfig/mdconfig.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 15cbbef58a28..f95223d6a102 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -32,6 +32,7 @@ struct md_ioctl mdio;
enum {UNSET, ATTACH, DETACH, LIST} action = UNSET;
void mdmaybeload(void);
+void usage(void);
void
usage()
@@ -200,10 +201,11 @@ int
list(const int fd)
{
char *disklist, *p, *p2, *p3;
- int unit, dll;
+ int unit;
+ size_t dll;
struct dl *dp, *di, *dn;
- if (sysctlbyname("kern.disks", NULL, &dll, NULL, NULL) == -1)
+ if (sysctlbyname("kern.disks", NULL, &dll, NULL, 0) == -1)
err(1, "sysctlbyname: kern.disks");
if ( (disklist = malloc(dll)) == NULL)
err(1, "malloc");
@@ -280,7 +282,7 @@ mdmaybeload(void)
{
struct module_stat mstat;
int fileid, modid;
- char *name = "md";
+ const char *name = "md";
char *cp;
/* scan files in kernel */