# HG changeset patch # User as158974 # Date 1175253165 25200 # Node ID 0347144fd43b5c6e4c74dd302008b7722328e945 # Parent 59477feabc5466077e26fbfb1ebb2cac7d7b6427 6538049 libdevinfo doesn't convert prom alias to prom device diff -r 59477feabc54 -r 0347144fd43b usr/src/lib/libdevinfo/devfsinfo.c --- 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);