diff options
| author | cth <none@none> | 2005-08-06 19:19:22 -0700 |
|---|---|---|
| committer | cth <none@none> | 2005-08-06 19:19:22 -0700 |
| commit | 5c3113005025c7746cee7871e37f22045f093f96 (patch) | |
| tree | f9df80b7eb361e305f32fcceceae0460a5fea44d /usr/src/uts/common/krtld/kobj.c | |
| parent | 43a291055ab3951f6372241323fd4e2486098fff (diff) | |
| download | illumos-gate-5c3113005025c7746cee7871e37f22045f093f96.tar.gz | |
6302583 modload with absolute paths does not work in snv_20
Diffstat (limited to 'usr/src/uts/common/krtld/kobj.c')
| -rw-r--r-- | usr/src/uts/common/krtld/kobj.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/usr/src/uts/common/krtld/kobj.c b/usr/src/uts/common/krtld/kobj.c index 4b764fd337..6df0916ea0 100644 --- a/usr/src/uts/common/krtld/kobj.c +++ b/usr/src/uts/common/krtld/kobj.c @@ -3195,6 +3195,25 @@ kobj_boot_mod_lookup(const char *modname) } /* + * Determine if the module exists. + */ +int +kobj_path_exists(char *name, int use_path) +{ + struct _buf *file; + + file = kobj_open_path(name, use_path, 1); +#ifdef MODDIR_SUFFIX + if (file == (struct _buf *)-1) + file = kobj_open_path(name, use_path, 0); +#endif /* MODDIR_SUFFIX */ + if (file == (struct _buf *)-1) + return (0); + kobj_close_file(file); + return (1); +} + +/* * fullname is dynamically allocated to be able to hold the * maximum size string that can be constructed from name. * path is exactly like the shell PATH variable. |
