Changeset beb9336 in mainline for uspace/app/testwrit/testwrit.c
- Timestamp:
- 2012-08-24T14:07:52Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 041ab64
- Parents:
- bd29f9c9 (diff), db81577 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/testwrit/testwrit.c
rbd29f9c9 rbeb9336 31 31 */ 32 32 33 34 33 #include <stdio.h> 35 34 #include <unistd.h> 36 35 37 #define BUF_SIZE 102436 #define BUF_SIZE 1024 38 37 39 int main(int argc, char * *argv)38 int main(int argc, char *argv[]) 40 39 { 41 42 40 char buffer[BUF_SIZE]; 43 41 uint64_t iterations, i; … … 47 45 /* Prepare some example data */ 48 46 memset(buffer, 0xcafebabe, BUF_SIZE); 49 47 50 48 if (argc != 3) { 51 49 printf("syntax: testwrit <iterations> <target file>\n"); 52 50 return 1; 53 51 } 54 52 55 53 char *end; 56 54 iterations = strtoul(argv[1], &end, 10); 57 55 file_name = argv[2]; 58 56 59 57 /* Open target file */ 60 58 file = fopen(file_name, "a"); … … 70 68 71 69 fclose(file); 72 70 73 71 return 0; 74 72 } 75 76 73 77 74 /**
Note:
See TracChangeset
for help on using the changeset viewer.