74 |
|
#endif |
75 |
|
|
76 |
|
#ifdef SOLARIS |
77 |
< |
char *get_svr_from_bsd(char *bsd){ |
77 |
> |
const char *get_svr_from_bsd(const char *bsd){ |
78 |
|
#ifdef HAVE_LIBDEVINFO_H |
79 |
|
mapping_t *map_ptr; |
80 |
|
for(map_ptr = mapping; map_ptr != NULL; map_ptr = map_ptr->next) |
89 |
|
mapping_t *map_ptr; |
90 |
|
mapping_t *map_end_ptr; |
91 |
|
|
92 |
– |
bsd = strdup(bsd); |
93 |
– |
svr = strdup(svr); |
94 |
– |
|
92 |
|
if (mapping == NULL){ |
93 |
|
mapping = malloc(sizeof(mapping_t)); |
94 |
|
if (mapping == NULL) return; |
111 |
|
} |
112 |
|
|
113 |
|
map_ptr->next = NULL; |
114 |
< |
map_ptr->bsd = bsd; |
115 |
< |
map_ptr->svr = svr; |
114 |
> |
map_ptr->bsd = strdup(bsd); |
115 |
> |
map_ptr->svr = strdup(svr); |
116 |
|
|
117 |
|
return; |
118 |
|
} |
213 |
|
int found; |
214 |
|
|
215 |
|
if ((kc = kstat_open()) == NULL) { |
216 |
< |
return; |
216 |
> |
return 1; |
217 |
|
} |
218 |
|
|
219 |
|
for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { |