Subversion Repositories HelenOS

Rev

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

Rev 3650 Rev 3651
Line 80... Line 80...
80
    if (vb)
80
    if (vb)
81
        printf("Copying %s to %s\n", src, dest);
81
        printf("Copying %s to %s\n", src, dest);
82
 
82
 
83
    if (-1 == (fd1 = open(src, O_RDONLY))) {
83
    if (-1 == (fd1 = open(src, O_RDONLY))) {
84
        printf("Unable to open source file %s\n", src);
84
        printf("Unable to open source file %s\n", src);
85
        return copied;
85
        return -1;
86
    }
86
    }
87
 
87
 
88
    if (-1 == (fd2 = open(dest, O_CREAT))) {
88
    if (-1 == (fd2 = open(dest, O_CREAT))) {
89
        printf("Unable to open destination file %s\n", dest);
89
        printf("Unable to open destination file %s\n", dest);
90
        close(fd1);
90
        close(fd1);
91
        return copied;
91
        return -1;
92
    }
92
    }
93
 
93
 
94
    total = lseek(fd1, 0, SEEK_END);
94
    total = lseek(fd1, 0, SEEK_END);
95
 
95
 
96
    if (vb)
96
    if (vb)