"rdtest" now dumps up to 1024 bytes, not only 512. Also, it now prints
out a message to indicate that only a part of the requested buffer is dumped on screen. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8941 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
30a0c00ded
commit
c6e3ff2240
@ -205,14 +205,16 @@ do_read_test(int argc, char **argv)
|
||||
buff[i] = (char)0xff;
|
||||
|
||||
err = sys_read(1, cur_fd, buff, len);
|
||||
|
||||
if (len < 512)
|
||||
hexdump(buff, len);
|
||||
else
|
||||
hexdump(buff, 512);
|
||||
|
||||
free(buff);
|
||||
printf("read read %lu bytes and returned %d\n", len, err);
|
||||
if (len <= 1024)
|
||||
hexdump(buff, len);
|
||||
else {
|
||||
printf("Hex dump shows only the first 1024 bytes:\n");
|
||||
hexdump(buff, 1024);
|
||||
}
|
||||
|
||||
free(buff);
|
||||
printf("read read %lu bytes and returned %d\n", len, err);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user