1 | $OpenBSD$
|
---|
2 | --- os_openbsd.cpp.orig Wed Jul 15 21:59:19 2009
|
---|
3 | +++ os_openbsd.cpp Thu Oct 28 19:21:27 2010
|
---|
4 | @@ -92,7 +92,7 @@ guess_device_type(const char *dev_name)
|
---|
5 | int
|
---|
6 | get_dev_names(char ***names, const char *prefix)
|
---|
7 | {
|
---|
8 | - char *disknames, *p, **mp;
|
---|
9 | + char *disknames, *p, *u, **mp;
|
---|
10 | int n = 0;
|
---|
11 | int sysctl_mib[2];
|
---|
12 | size_t sysctl_len;
|
---|
13 | @@ -121,6 +121,7 @@ get_dev_names(char ***names, const char *prefix)
|
---|
14 | if (strncmp(p, prefix, strlen(prefix))) {
|
---|
15 | continue;
|
---|
16 | }
|
---|
17 | + for (u = strtok(p, ":"); u; u = strtok(NULL, ":"));
|
---|
18 | mp[n] = (char *)malloc(strlen(net_dev_prefix) + strlen(p) + 2);
|
---|
19 | if (!mp[n]) {
|
---|
20 | pout("Out of memory constructing scan device list\n");
|
---|