Changeset 6e5562a in mainline for uspace/app/bdsh/cmds/modules/cp/cp.c


Ignore:
Timestamp:
2017-03-31T19:57:38Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
80743a1
Parents:
a56cef9
Message:

Introduce vfs_link_path() and replace mkdir() with it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/cp/cp.c

    ra56cef9 r6e5562a  
    3636#include <str.h>
    3737#include <fcntl.h>
    38 #include <sys/stat.h>
    3938#include <vfs/vfs.h>
    4039#include <dirent.h>
     
    296295                                merge_paths(dest_path, PATH_MAX, src_dirname);
    297296
    298                                 if (mkdir(dest_path, 0) != 0) {
     297                                if (vfs_link_path(dest_path, KIND_DIRECTORY) != EOK) {
    299298                                        printf("Unable to create "
    300299                                            "dest directory %s\n", dest_path);
     
    310309                         * e.g. cp -r /src /data/new_dir_src
    311310                         */
    312                         if (mkdir(dest_path, 0) != 0) {
     311                        if (vfs_link_path(dest_path, KIND_DIRECTORY) != EOK) {
    313312                                printf("Unable to create "
    314313                                    "dest directory %s\n", dest_path);
Note: See TracChangeset for help on using the changeset viewer.