summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.syscall/readwrite.c
diff options
context:
space:
mode:
authorhunt <hunt>2007-06-21 04:12:06 +0000
committerhunt <hunt>2007-06-21 04:12:06 +0000
commitcb7f0d1a2afef80d045efd2150ba3721efd84c47 (patch)
treed14c94a4fdee80dd21a2742700ba1892bec352c0 /testsuite/systemtap.syscall/readwrite.c
parent66f08017b92f685f9e62f76731c9cfc79a53f0b0 (diff)
downloadsystemtap-steved-cb7f0d1a2afef80d045efd2150ba3721efd84c47.tar.gz
systemtap-steved-cb7f0d1a2afef80d045efd2150ba3721efd84c47.tar.xz
systemtap-steved-cb7f0d1a2afef80d045efd2150ba3721efd84c47.zip
2007-06-21 Martin Hunt <hunt@redhat.com>
* chmod.c, dir.c, mmap.c, net1.c, readwrite.c, stat.c, sync.c, trunc.c: Eliminated hardcoded fd numbers.
Diffstat (limited to 'testsuite/systemtap.syscall/readwrite.c')
-rw-r--r--testsuite/systemtap.syscall/readwrite.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/testsuite/systemtap.syscall/readwrite.c b/testsuite/systemtap.syscall/readwrite.c
index 88f3a38a..6d53207d 100644
--- a/testsuite/systemtap.syscall/readwrite.c
+++ b/testsuite/systemtap.syscall/readwrite.c
@@ -25,50 +25,50 @@ int main()
v[2].iov_len = sizeof(STRING3);
fd = open("foobar1",O_WRONLY|O_CREAT, 0666);
- // open ("foobar1", O_WRONLY|O_CREAT, 0666) = 4
+ // open ("foobar1", O_WRONLY|O_CREAT, 0666) = NNNN
write(fd,"Hello world", 11);
- // write (4, "Hello world", 11) = 11
+ // write (NNNN, "Hello world", 11) = 11
write(fd,"Hello world abcdefghijklmnopqrstuvwxyz 01234567890", 50);
- // write (4, "Hello world abc"..., 50) = 50
+ // write (NNNN, "Hello world abc"..., 50) = 50
writev(fd, v, 3);
- // writev (4, XXXX, 3) = 15
+ // writev (NNNN, XXXX, 3) = 15
lseek(fd, 0, SEEK_SET);
- // lseek (4, 0, SEEK_SET) = 0
+ // lseek (NNNN, 0, SEEK_SET) = 0
lseek(fd, 1, SEEK_CUR);
- // lseek (4, 1, SEEK_CUR) = 1
+ // lseek (NNNN, 1, SEEK_CUR) = 1
lseek(fd, -1, SEEK_END);
- // lseek (4, -1, SEEK_END) = 75
+ // lseek (NNNN, -1, SEEK_END) = 75
#ifdef SYS__llseek
syscall(SYS__llseek, fd, 1, 0, &res, SEEK_SET);
- // llseek (4, 0x1, 0x0, XXXX, SEEK_SET) = 0
+ // llseek (NNNN, 0x1, 0x0, XXXX, SEEK_SET) = 0
syscall(SYS__llseek, fd, 0, 0, &res, SEEK_SET);
- // llseek (4, 0x0, 0x0, XXXX, SEEK_SET) = 0
+ // llseek (NNNN, 0x0, 0x0, XXXX, SEEK_SET) = 0
syscall(SYS__llseek, fd, 0, 12, &res, SEEK_CUR);
- // llseek (4, 0x0, 0xc, XXXX, SEEK_CUR) = 0
+ // llseek (NNNN, 0x0, 0xc, XXXX, SEEK_CUR) = 0
syscall(SYS__llseek, fd, 8, 1, &res, SEEK_END);
- // llseek (4, 0x8, 0x1, XXXX, SEEK_END) = 0
+ // llseek (NNNN, 0x8, 0x1, XXXX, SEEK_END) = 0
#endif
close (fd);
fd = open("foobar1",O_RDONLY);
- // open ("foobar1", O_RDONLY) = 4
+ // open ("foobar1", O_RDONLY) = NNNN
read(fd, buf, 11);
- // read (4, XXXX, 11) = 11
+ // read (NNNN, XXXX, 11) = 11
read(fd, buf, 50);
- // read (4, XXXX, 50) = 50
+ // read (NNNN, XXXX, 50) = 50
x[0].iov_base = buf1;
x[0].iov_len = sizeof(STRING1);
@@ -77,7 +77,7 @@ int main()
x[2].iov_base = buf3;
x[2].iov_len = sizeof(STRING3);
readv(fd, x, 3);
- // readv (4, XXXX, 3) = 15
+ // readv (NNNN, XXXX, 3) = 15
close (fd);