junk
This commit is contained in:
parent
9d59eb0151
commit
8960f60b30
3 changed files with 5 additions and 5 deletions
6
stat.h
6
stat.h
|
@ -1,11 +1,11 @@
|
||||||
#define T_DIR 1 // Directory
|
#define T_DIR 1 // Directory
|
||||||
#define T_FILE 2 // File
|
#define T_FILE 2 // File
|
||||||
#define T_DEV 3 // Special device
|
#define T_DEV 3 // Device
|
||||||
|
|
||||||
struct stat {
|
struct stat {
|
||||||
short type; // Type of file
|
short type; // Type of file
|
||||||
int dev; // Device number
|
int dev; // File system's disk device
|
||||||
uint ino; // Inode number on device
|
uint ino; // Inode number
|
||||||
short nlink; // Number of links to file
|
short nlink; // Number of links to file
|
||||||
uint size; // Size of file in bytes
|
uint size; // Size of file in bytes
|
||||||
};
|
};
|
||||||
|
|
2
wc.c
2
wc.c
|
@ -44,7 +44,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
for(i = 1; i < argc; i++){
|
for(i = 1; i < argc; i++){
|
||||||
if((fd = open(argv[i], 0)) < 0){
|
if((fd = open(argv[i], 0)) < 0){
|
||||||
printf(1, "cat: cannot open %s\n", argv[i]);
|
printf(1, "wc: cannot open %s\n", argv[i]);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
wc(fd, argv[i]);
|
wc(fd, argv[i]);
|
||||||
|
|
Loading…
Reference in a new issue