Changeset 14c29ba in mainline for uspace/app/mkminix/mkminix.c


Ignore:
Timestamp:
2011-03-11T18:41:48Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ccbc5b56
Parents:
b84175a
Message:

Fix directory entries initialization, mkminix is now ready to be used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkminix/mkminix.c

    rb84175a r14c29ba  
    4545#include <sys/typefmt.h>
    4646#include <inttypes.h>
    47 #include <str.h>
    4847#include <getopt.h>
    4948#include <mem.h>
     
    284283
    285284        root_block = (void *) malloc(MFS_MIN_BLOCKSIZE);
     285        memset(root_block, 0x00, MFS_MIN_BLOCKSIZE);
    286286
    287287        if (!root_block)
     
    293293
    294294                dentry->d_inum = MFS_ROOT_INO;
    295                 str_cpy(dentry->d_name, 1, ".");
     295                memcpy(dentry->d_name, ".\0", 2);
    296296
    297297                NEXT_DENTRY(dentry, sb->dirsize);
    298298
    299299                dentry->d_inum = MFS_ROOT_INO;
    300                 str_cpy(dentry->d_name, 2, "..");
     300                memcpy(dentry->d_name, "..\0", 3);
    301301        } else {
    302302                /*Directory entries for V3 filesystem*/
     
    304304
    305305                dentry->d_inum = MFS_ROOT_INO;
    306                 str_cpy(dentry->d_name, 1, ".");
     306                memcpy(dentry->d_name, ".\0", 2);
    307307
    308308                NEXT_DENTRY(dentry, sb->dirsize);
    309309
    310310                dentry->d_inum = MFS_ROOT_INO;
    311                 str_cpy(dentry->d_name, 2, "..");
     311                memcpy(dentry->d_name, "..\0", 3);
    312312        }
    313313
Note: See TracChangeset for help on using the changeset viewer.