cp: improvements

- improve copying block, char devices, fifo and sockets with -a.
- improve exit status code.
This commit is contained in:
Hiltjo Posthuma
2014-07-21 16:27:20 +00:00
committed by sin
parent 35959cd1c4
commit 323c45edb7
3 changed files with 47 additions and 28 deletions

2
cp.c
View File

@@ -49,5 +49,5 @@ main(int argc, char *argv[])
if(argc > 2 && !(stat(argv[argc-1], &st) == 0 && S_ISDIR(st.st_mode)))
eprintf("%s: not a directory\n", argv[argc-1]);
enmasse(argc, argv, cp);
return EXIT_SUCCESS;
return cp_status;
}