Subversion Repositories HelenOS

Rev

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

Rev 2751 Rev 2758
Line 143... Line 143...
143
    int lflag = IPC_GET_ARG4(*request);
143
    int lflag = IPC_GET_ARG4(*request);
144
 
144
 
145
    if (last < next)
145
    if (last < next)
146
        last += PLB_SIZE;
146
        last += PLB_SIZE;
147
 
147
 
-
 
148
    void *par = NULL;
148
    void *cur = ops->root_get();
149
    void *cur = ops->root_get();
149
    void *tmp = ops->child_get(cur);
150
    void *tmp = ops->child_get(cur);
150
 
151
 
151
    if (ops->plb_get_char(next) == '/')
152
    if (ops->plb_get_char(next) == '/')
152
        next++;     /* eat slash */
153
        next++;     /* eat slash */
Line 204... Line 205...
204
            ipc_answer_0(rid, ENOENT);
205
            ipc_answer_0(rid, ENOENT);
205
            return;
206
            return;
206
        }
207
        }
207
 
208
 
208
        /* descend one level */
209
        /* descend one level */
-
 
210
        par = cur;
209
        cur = tmp;
211
        cur = tmp;
210
        tmp = ops->child_get(tmp);
212
        tmp = ops->child_get(tmp);
211
    }
213
    }
212
 
214
 
213
    /* handle miss: excessive components */
215
    /* handle miss: excessive components */
Line 258... Line 260...
258
    }
260
    }
259
 
261
 
260
    /* handle hit */
262
    /* handle hit */
261
    if (lflag & L_DESTROY) {
263
    if (lflag & L_DESTROY) {
262
        unsigned old_lnkcnt = ops->lnkcnt_get(cur);
264
        unsigned old_lnkcnt = ops->lnkcnt_get(cur);
263
        int res = ops->unlink(cur);
265
        int res = ops->unlink(par, cur);
264
        ipc_answer_5(rid, (ipcarg_t)res, fs_handle, dev_handle,
266
        ipc_answer_5(rid, (ipcarg_t)res, fs_handle, dev_handle,
265
            ops->index_get(cur), ops->size_get(cur), old_lnkcnt);
267
            ops->index_get(cur), ops->size_get(cur), old_lnkcnt);
266
        return;
268
        return;
267
    }
269
    }
268
    if ((lflag & (L_CREATE | L_EXCLUSIVE)) == (L_CREATE | L_EXCLUSIVE)) {
270
    if ((lflag & (L_CREATE | L_EXCLUSIVE)) == (L_CREATE | L_EXCLUSIVE)) {