X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=touch.c;h=a3256d55970dc4fc746a2b1d29e22ac0d3ba620e;hb=f1bbb22dca4d39aa227246f4c2ee90acd7e512a4;hp=5537fb63bfec60f2107d13498ea4e771358cf552;hpb=3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0;p=oweals%2Fbusybox.git diff --git a/touch.c b/touch.c index 5537fb63b..a3256d559 100644 --- a/touch.c +++ b/touch.c @@ -3,7 +3,7 @@ * Mini touch implementation for busybox * * - * Copyright (C) 1999,2000 by Lineo, inc. + * Copyright (C) 1999,2000,2001 by Lineo, inc. * Written by Erik Andersen , * * This program is free software; you can redistribute it and/or modify @@ -28,6 +28,8 @@ #include #include #include +#include +#include extern int touch_main(int argc, char **argv) { @@ -42,13 +44,13 @@ extern int touch_main(int argc, char **argv) create = FALSE; break; default: - usage(touch_usage); + show_usage(); } } } if (argc < 1) { - usage(touch_usage); + show_usage(); } while (argc > 0) { @@ -58,12 +60,12 @@ extern int touch_main(int argc, char **argv) if (create == FALSE && errno == ENOENT) return EXIT_SUCCESS; else { - fatalError("%s", strerror(errno)); + perror_msg_and_die("%s", *argv); } } close(fd); if (utime(*argv, NULL)) { - fatalError("%s", strerror(errno)); + perror_msg_and_die("%s", *argv); } argc--; argv++;