Rev 4585 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4585 | Rev 4587 | ||
---|---|---|---|
Line 162... | Line 162... | ||
162 | first %= PLB_SIZE; |
162 | first %= PLB_SIZE; |
163 | } |
163 | } |
164 | 164 | ||
165 | if (first >= last) { |
165 | if (first >= last) { |
166 | /* Root entry */ |
166 | /* Root entry */ |
167 | if (lflag & L_DIRECTORY) |
167 | if (!(lflag & L_FILE)) |
168 | ipc_answer_5(rid, EOK, devfs_reg.fs_handle, dev_handle, 0, 0, 0); |
168 | ipc_answer_5(rid, EOK, devfs_reg.fs_handle, dev_handle, 0, 0, 0); |
169 | else |
169 | else |
170 | ipc_answer_0(rid, ENOENT); |
170 | ipc_answer_0(rid, ENOENT); |
171 | } else { |
171 | } else { |
172 | if (lflag & L_FILE) { |
172 | if (!(lflag & L_DIRECTORY)) { |
173 | size_t len; |
173 | size_t len; |
174 | if (last >= first) |
174 | if (last >= first) |
175 | len = last - first + 1; |
175 | len = last - first + 1; |
176 | else |
176 | else |
177 | len = first + PLB_SIZE - last + 1; |
177 | len = first + PLB_SIZE - last + 1; |