Mercurial > illumos > illumos-gate
changeset 3931:0347144fd43b
6538049 libdevinfo doesn't convert prom alias to prom device
author | as158974 |
---|---|
date | Fri, 30 Mar 2007 04:12:45 -0700 |
parents | 59477feabc54 |
children | efce29b04ab4 |
files | usr/src/lib/libdevinfo/devfsinfo.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libdevinfo/devfsinfo.c Fri Mar 30 01:55:41 2007 -0700 +++ b/usr/src/lib/libdevinfo/devfsinfo.c Fri Mar 30 04:12:45 2007 -0700 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2205,7 +2205,7 @@ return (ret); } - (void) strlcpy(ret_buf, alias_def, strlen(ret_buf) + 1); + (void) strlcpy(ret_buf, alias_def, MAXPATHLEN); /* override minor name information */ if (options_ptr != NULL) { @@ -2251,7 +2251,7 @@ if (opp->oprom_size == 0) return (-1); - (void) strlcpy(ret_buf, opp->oprom_array, strlen(ret_buf) + 1); + (void) strlcpy(ret_buf, opp->oprom_array, MAXPATHLEN); return (0); } @@ -2262,7 +2262,7 @@ prom_find_aliases_node(int fd) { uint_t child_id; - char buf[MAXNAMELEN]; + char buf[MAXPATHLEN]; if ((child_id = prom_next_node(fd, 0)) == 0) return (-1);