Permalink
Browse files

6841218 incorrectly generated filename in kobj_open_path leads to nee…

…dless errors in kobj_open_file
  • Loading branch information...
1 parent 14e0668 commit da346f3bc0331b6eccfd415d6e858b447c46ba81 Pramod Batni committed Jul 7, 2009
Showing with 7 additions and 5 deletions.
  1. +4 −2 usr/src/uts/common/krtld/kobj.c
  2. +3 −3 usr/src/uts/sun4/os/mlsetup.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -3485,9 +3485,11 @@ kobj_open_path(char *name, int use_path, int use_moddir_suffix)
kobj_free(fullname, maxpathlen);
return (file);
}
+ while (*pathp == ' ')
+ pathp++;
if (*pathp == 0)
break;
- pathp++;
+
}
kobj_free(fullname, maxpathlen);
if (_moddebug & MODDEBUG_ERRMSG) {
@@ -512,11 +512,11 @@ mach_modpath(char *path, const char *fname)
*/
(void) strcpy(path, "/platform/");
(void) strcat(path, platname);
- (void) strcat(path, "/kernel ");
+ (void) strcat(path, "/kernel");
if (!compat) {
- (void) strcat(path, "/platform/");
+ (void) strcat(path, " /platform/");
(void) strcat(path, defname);
- (void) strcat(path, "/kernel ");
+ (void) strcat(path, "/kernel");
}
return;

0 comments on commit da346f3

Please sign in to comment.