Subversion Repositories HelenOS

Rev

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

Rev 2925 Rev 3011
Line 84... Line 84...
84
    if (!quiet)
84
    if (!quiet)
85
        printf("sought to position 0, fd=%d\n", fd0);
85
        printf("sought to position 0, fd=%d\n", fd0);
86
 
86
 
87
    char buf[10];
87
    char buf[10];
88
 
88
 
89
    cnt = read(fd0, buf, sizeof(buf));
89
    while ((cnt = read(fd0, buf, sizeof(buf)))) {
90
    if (cnt < 0)
90
        if (cnt < 0)
91
        return "read() failed.\n";
91
            return "read() failed.\n";
92
 
-
 
93
    if (!quiet)
92
        if (!quiet)
94
        printf("read %d bytes: \"%.*s\", fd=%d\n", cnt, cnt, buf, fd0);
93
            printf("read %d bytes: \"%.*s\", fd=%d\n", cnt, cnt,
-
 
94
                buf, fd0);
-
 
95
    }
95
 
96
 
96
    close(fd0);
97
    close(fd0);
97
 
98
 
98
    DIR *dirp;
99
    DIR *dirp;
99
    struct dirent *dp;
100
    struct dirent *dp;