Fixed 'ls -s' so it actually displays block sizes again.
[oweals/busybox.git] / tar.c
diff --git a/tar.c b/tar.c
index 60744e8db91740256fc37398f8616375165305d6..62f1b1d35838ace79a64f8f1eda73e3d86c7b14a 100644 (file)
--- a/tar.c
+++ b/tar.c
@@ -214,7 +214,7 @@ extern int tar_main(int argc, char **argv)
        int opt;
 
        if (argc <= 1)
-               usage(tar_usage);
+               show_usage();
 
        if (argv[1][0] != '-') {
                char *tmp = xmalloc(strlen(argv[1]) + 2);
@@ -274,8 +274,7 @@ extern int tar_main(int argc, char **argv)
                                while (fgets(file, sizeof(file), fileList) != NULL) {
                                        excludeList = xrealloc(excludeList,
                                                        sizeof(char *) * (excludeListSize+2));
-                                       if (file[strlen(file)-1] == '\n')
-                                               file[strlen(file)-1] = '\0';
+                                       chomp(file);
                                        excludeList[excludeListSize] = xstrdup(file);
                                        /* Tack a NULL onto the end of the list */
                                        excludeList[++excludeListSize] = NULL;
@@ -284,7 +283,7 @@ extern int tar_main(int argc, char **argv)
                                break;
 #endif
                                default:
-                                       usage(tar_usage);
+                                       show_usage();
                }
        }