Rev 2844 | Rev 2847 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2844 | Rev 2846 | ||
|---|---|---|---|
| Line 146... | Line 146... | ||
| 146 | if (last < next) |
146 | if (last < next) |
| 147 | last += PLB_SIZE; |
147 | last += PLB_SIZE; |
| 148 | 148 | ||
| 149 | void *par = NULL; |
149 | void *par = NULL; |
| 150 | void *cur = ops->root_get(dev_handle); |
150 | void *cur = ops->root_get(dev_handle); |
| 151 | void *tmp; |
- | |
| 152 | 151 | ||
| 153 | if (ops->plb_get_char(next) == '/') |
152 | if (ops->plb_get_char(next) == '/') |
| 154 | next++; /* eat slash */ |
153 | next++; /* eat slash */ |
| 155 | 154 | ||
| 156 | char component[NAME_MAX + 1]; |
155 | char component[NAME_MAX + 1]; |
| 157 | int len = 0; |
156 | int len = 0; |
| 158 | while (ops->has_children(cur) && next <= last) { |
157 | while (ops->has_children(cur) && next <= last) { |
| - | 158 | void *tmp; |
|
| 159 | 159 | ||
| 160 | /* collect the component */ |
160 | /* collect the component */ |
| 161 | if (ops->plb_get_char(next) != '/') { |
161 | while ((ops->plb_get_char(next) != '/') && (next <= last)) { |
| 162 | if (len + 1 == NAME_MAX) { |
162 | if (len + 1 == NAME_MAX) { |
| 163 | /* comopnent length overflow */ |
163 | /* comopnent length overflow */ |
| 164 | ipc_answer_0(rid, ENAMETOOLONG); |
164 | ipc_answer_0(rid, ENAMETOOLONG); |
| 165 | return; |
165 | return; |
| 166 | } |
166 | } |
| 167 | component[len++] = ops->plb_get_char(next); |
167 | component[len++] = ops->plb_get_char(next); |
| 168 | next++; /* process next character */ |
168 | next++; /* process next character */ |
| 169 | if (next <= last) |
- | |
| 170 | continue; |
- | |
| 171 | } |
169 | } |
| 172 | 170 | ||
| 173 | assert(len); |
171 | assert(len); |
| 174 | component[len] = '\0'; |
172 | component[len] = '\0'; |
| 175 | next++; /* eat slash */ |
173 | next++; /* eat slash */ |