Subversion Repositories HelenOS

Rev

Rev 2705 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2705 Rev 2706
Line 243... Line 243...
243
    if (PLB_GET_CHAR(next) == '/')
243
    if (PLB_GET_CHAR(next) == '/')
244
        next++;     /* eat slash */
244
        next++;     /* eat slash */
245
   
245
   
246
    char component[NAME_MAX + 1];
246
    char component[NAME_MAX + 1];
247
    int len = 0;
247
    int len = 0;
248
    while (next <= last) {
248
    while (dtmp && next <= last) {
249
 
249
 
250
        /* collect the component */
250
        /* collect the component */
251
        if (PLB_GET_CHAR(next) != '/') {
251
        if (PLB_GET_CHAR(next) != '/') {
252
            if (len + 1 == NAME_MAX) {
252
            if (len + 1 == NAME_MAX) {
253
                /* comopnent length overflow */
253
                /* comopnent length overflow */
Line 293... Line 293...
293
        }
293
        }
294
 
294
 
295
        /* descent one level */
295
        /* descent one level */
296
        dcur = dtmp;
296
        dcur = dtmp;
297
        dtmp = dtmp->child;
297
        dtmp = dtmp->child;
-
 
298
    }
298
 
299
 
299
        /* handle miss: excessive components */
300
    /* handle miss: excessive components */
300
        if (!dtmp && next <= last) {
301
    if (!dtmp && next <= last) {
301
            if (lflag & L_CREATE) {
302
        if (lflag & L_CREATE) {
302
                if (dcur->type != TMPFS_DIRECTORY) {
303
            if (dcur->type != TMPFS_DIRECTORY) {
Line 324... Line 325...
324
                len = 0;
325
            len = 0;
325
               
326
               
326
                unsigned long index;
327
            unsigned long index;
327
                index = create_node(dcur, component, lflag);
328
            index = create_node(dcur, component, lflag);
328
                if (index) {
329
            if (index) {
329
                    ipc_answer_4(rid, EOK,
330
                ipc_answer_4(rid, EOK, tmpfs_reg.fs_handle,
330
                        tmpfs_reg.fs_handle, dev_handle,
-
 
331
                        index, 0);
331
                    dev_handle, index, 0);
332
                } else {
332
            } else {
333
                    ipc_answer_0(rid, ENOSPC);
333
                ipc_answer_0(rid, ENOSPC);
334
                }
334
            }
335
                return;
335
            return;
336
            }
336
        }
337
            ipc_answer_0(rid, ENOENT);
337
        ipc_answer_0(rid, ENOENT);
338
            return;
338
        return;
339
        }
339
    }
340
   
340
 
341
    }
-
 
342
 
-
 
343
    /* handle hit */
341
    /* handle hit */
344
    if (lflag & L_DESTROY) {
342
    if (lflag & L_DESTROY) {
345
        int res = destroy_component(dcur);
343
        int res = destroy_component(dcur);
346
        ipc_answer_0(rid, res);
344
        ipc_answer_0(rid, res);
347
        return;
345
        return;