Subversion Repositories HelenOS

Rev

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

Rev 4264 Rev 4268
Line 487... Line 487...
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
        str_cmp(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
        str_cmp(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. */