summaryrefslogtreecommitdiff
path: root/stressfs.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2011-07-27 20:49:45 -0400
committerFrans Kaashoek <[email protected]>2011-07-27 20:49:45 -0400
commitdccb915282854476ce47752df6631dcce3b8f661 (patch)
treea84aa8ed35618f99c3d7e8cdd466d22ae7bad597 /stressfs.c
parent9acdfe0d04f3fcf95c6e392e08afb45bdfe16c20 (diff)
parent13a96baefc0ff5d8262c4bc8c797bee4b157443c (diff)
downloadxv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.gz
xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.bz2
xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.zip
Merge commit 'origin/master' into page
Diffstat (limited to 'stressfs.c')
-rw-r--r--stressfs.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/stressfs.c b/stressfs.c
index 21a5d16..5d4fee2 100644
--- a/stressfs.c
+++ b/stressfs.c
@@ -14,21 +14,20 @@
int
main(int argc, char *argv[])
{
- int i;
+ int fd, i;
+ char path[] = "stressfs0";
+
printf(1, "stressfs starting\n");
- for (i = 0; i < 4; i++) {
- if (fork() > 0) {
+ for(i = 0; i < 4; i++)
+ if(fork() > 0)
break;
- }
- }
printf(1, "%d\n", i);
- char path[] = "stressfs0";
path[8] += i;
- int fd = open(path, O_CREATE | O_RDWR);
- for (i = 0; i < 100; i++)
+ fd = open(path, O_CREATE | O_RDWR);
+ for(i = 0; i < 100; i++)
printf(fd, "%d\n", i);
close(fd);