0008-Provide-command-line-option-a.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
  2. Date: Thu, 24 Oct 2013 01:11:21 -0200
  3. Subject: Provide command line option -a
  4. Create a new command line option (-a) for the fsck.hfsplus that has the same
  5. behavior that the -p option has, for greater compatibility with other tools.
  6. ---
  7. fsck_hfs.tproj/fsck_hfs.c | 5 +++--
  8. 1 file changed, 3 insertions(+), 2 deletions(-)
  9. diff --git a/fsck_hfs.tproj/fsck_hfs.c b/fsck_hfs.tproj/fsck_hfs.c
  10. index f1a18bd..6117698 100644
  11. --- a/fsck_hfs.tproj/fsck_hfs.c
  12. +++ b/fsck_hfs.tproj/fsck_hfs.c
  13. @@ -104,7 +104,7 @@ main(argc, argv)
  14. else
  15. progname = *argv;
  16. - while ((ch = getopt(argc, argv, "c:D:dfglm:npqruy")) != EOF) {
  17. + while ((ch = getopt(argc, argv, "c:D:dfglm:napqruy")) != EOF) {
  18. switch (ch) {
  19. case 'c':
  20. /* Cache size to use in fsck_hfs */
  21. @@ -169,6 +169,7 @@ main(argc, argv)
  22. yflag = 0;
  23. break;
  24. + case 'a':
  25. case 'p':
  26. preen++;
  27. break;
  28. @@ -572,7 +573,7 @@ usage()
  29. (void) fprintf(stderr, " l = live fsck (lock down and test-only)\n");
  30. (void) fprintf(stderr, " m arg = octal mode used when creating lost+found directory \n");
  31. (void) fprintf(stderr, " n = assume a no response \n");
  32. - (void) fprintf(stderr, " p = just fix normal inconsistencies \n");
  33. + (void) fprintf(stderr, " p, a = just fix normal inconsistencies \n");
  34. (void) fprintf(stderr, " q = quick check returns clean, dirty, or failure \n");
  35. (void) fprintf(stderr, " r = rebuild catalog btree \n");
  36. (void) fprintf(stderr, " u = usage \n");