Subversion Repositories HelenOS

Rev

Rev 3686 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3686 Rev 3688
Line 81... Line 81...
81
 
81
 
82
    link_t *cur;
82
    link_t *cur;
83
    module_t *m;
83
    module_t *m;
84
    char *p, *soname;
84
    char *p, *soname;
85
 
85
 
86
    printf("got head ptr\n");
-
 
87
    printf(" = 0x%lx\n", (long) head);
-
 
88
 
-
 
89
    /*
86
    /*
90
     * If name contains slashes, treat it as a pathname and
87
     * If name contains slashes, treat it as a pathname and
91
     * construct soname by chopping off the path. Otherwise
88
     * construct soname by chopping off the path. Otherwise
92
     * treat it as soname.
89
     * treat it as soname.
93
     */
90
     */
94
    p = strrchr(name, '/');
91
    p = strrchr(name, '/');
95
    soname = p ? (p + 1) : name;
92
    soname = p ? (p + 1) : name;
96
 
93
 
97
    printf("did strrchr. soname='%s'\n", soname);
-
 
98
   
-
 
99
    /* Traverse list of all modules. Not extremely fast, but simple */
94
    /* Traverse list of all modules. Not extremely fast, but simple */
100
    for (cur = head->next; cur != head; cur = cur->next) {
95
    for (cur = head->next; cur != head; cur = cur->next) {
101
        printf("get_instance...\n");
-
 
102
        m = list_get_instance(cur, module_t, modules_link);
96
        m = list_get_instance(cur, module_t, modules_link);
103
        if (strcmp(m->dyn.soname, soname) == 0) {
97
        if (strcmp(m->dyn.soname, soname) == 0) {
104
            return m; /* Found */
98
            return m; /* Found */
105
        }
99
        }
106
    }
100
    }