Mercurial > illumos > illumos-gate
changeset 6507:e9fe7cad0646
6672687 md loadable module for devfsadm leaks filedescriptors
author | ps216548 |
---|---|
date | Tue, 29 Apr 2008 01:43:08 -0700 |
parents | 7b0c3c976ebc |
children | 5aa21ca83cd2 |
files | usr/src/cmd/devfsadm/md_link.c |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/devfsadm/md_link.c Mon Apr 28 23:01:05 2008 -0700 +++ b/usr/src/cmd/devfsadm/md_link.c Tue Apr 29 01:43:08 2008 -0700 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -75,6 +75,16 @@ /* + * minor_fini - module cleanup routine + */ +int +minor_fini(void) +{ + metarpccloseall(); + return (DEVFSADM_SUCCESS); +} + +/* * For the admin device: * /dev/md/admin -> /devices/pseudo/md@0:admin * @@ -152,12 +162,12 @@ if (set == 0) { /* this is a simple md */ (void) snprintf(path, sizeof (path), - "md/%s/%s", dir, basename(device_name)); + "md/%s/%s", dir, basename(device_name)); } else { /* this is a shared md */ (void) snprintf(path, sizeof (path), - "md/shared/%d/%s/%s", set, dir, - basename(device_name)); + "md/shared/%d/%s/%s", set, dir, + basename(device_name)); /* * flush the caches so the next call to