Subversion Repositories HelenOS

Rev

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

Rev 4055 Rev 4296
Line 485... Line 485...
485
     * not use them anyway, so this is rather a sign of our good will.
485
     * not use them anyway, so this is rather a sign of our good will.
486
     */
486
     */
487
    b = fat_block_get(bs, childp, 0, BLOCK_FLAGS_NONE);
487
    b = fat_block_get(bs, childp, 0, BLOCK_FLAGS_NONE);
488
    d = (fat_dentry_t *)b->data;
488
    d = (fat_dentry_t *)b->data;
489
    if (fat_classify_dentry(d) == FAT_DENTRY_LAST ||
489
    if (fat_classify_dentry(d) == FAT_DENTRY_LAST ||
490
        strcmp(d->name, FAT_NAME_DOT) == 0) {
490
        str_cmp(d->name, FAT_NAME_DOT) == 0) {
491
        memset(d, 0, sizeof(fat_dentry_t));
491
        memset(d, 0, sizeof(fat_dentry_t));
492
        strcpy(d->name, FAT_NAME_DOT);
492
        str_cpy(d->name, 8, FAT_NAME_DOT);
493
        strcpy(d->ext, FAT_EXT_PAD);
493
        str_cpy(d->ext, 3, FAT_EXT_PAD);
494
        d->attr = FAT_ATTR_SUBDIR;
494
        d->attr = FAT_ATTR_SUBDIR;
495
        d->firstc = host2uint16_t_le(childp->firstc);
495
        d->firstc = host2uint16_t_le(childp->firstc);
496
        /* TODO: initialize also the date/time members. */
496
        /* TODO: initialize also the date/time members. */
497
    }
497
    }
498
    d++;
498
    d++;
499
    if (fat_classify_dentry(d) == FAT_DENTRY_LAST ||
499
    if (fat_classify_dentry(d) == FAT_DENTRY_LAST ||
500
        strcmp(d->name, FAT_NAME_DOT_DOT) == 0) {
500
        str_cmp(d->name, FAT_NAME_DOT_DOT) == 0) {
501
        memset(d, 0, sizeof(fat_dentry_t));
501
        memset(d, 0, sizeof(fat_dentry_t));
502
        strcpy(d->name, FAT_NAME_DOT_DOT);
502
        str_cpy(d->name, 8, FAT_NAME_DOT_DOT);
503
        strcpy(d->ext, FAT_EXT_PAD);
503
        str_cpy(d->ext, 3, FAT_EXT_PAD);
504
        d->attr = FAT_ATTR_SUBDIR;
504
        d->attr = FAT_ATTR_SUBDIR;
505
        d->firstc = (parentp->firstc == FAT_CLST_ROOT) ?
505
        d->firstc = (parentp->firstc == FAT_CLST_ROOT) ?
506
            host2uint16_t_le(FAT_CLST_RES0) :
506
            host2uint16_t_le(FAT_CLST_RES0) :
507
            host2uint16_t_le(parentp->firstc);
507
            host2uint16_t_le(parentp->firstc);
508
        /* TODO: initialize also the date/time members. */
508
        /* TODO: initialize also the date/time members. */
Line 935... Line 935...
935
        fat_node_put(nodep);
935
        fat_node_put(nodep);
936
        ipc_answer_0(callid, ENOENT);
936
        ipc_answer_0(callid, ENOENT);
937
        ipc_answer_1(rid, ENOENT, 0);
937
        ipc_answer_1(rid, ENOENT, 0);
938
        return;
938
        return;
939
hit:
939
hit:
940
        (void) ipc_data_read_finalize(callid, name, strlen(name) + 1);
940
        (void) ipc_data_read_finalize(callid, name, str_size(name) + 1);
941
        bytes = (pos - spos) + 1;
941
        bytes = (pos - spos) + 1;
942
    }
942
    }
943
 
943
 
944
    fat_node_put(nodep);
944
    fat_node_put(nodep);
945
    ipc_answer_1(rid, EOK, (ipcarg_t)bytes);
945
    ipc_answer_1(rid, EOK, (ipcarg_t)bytes);