UPSTREAM: erofs-utils: fsck: fix issues related to --extract=X

* Added tar-like default behaviors for --[no-]preserve options:
  normal user - uses user's owner ID + umask on perms by default;
  root user - preserve original owner IDs + perms by default;
  and add appropriate error message when used without --extract=X.
* "--[no-]same-owner" and "--[no-]same-permissions" were renamed
  to "--[no-]preserve-owner" and "--[no-]preserve-perms" to
  better represent what these options do, the word "same" is
  ambiguous and tells nothing to the user ("same" to what?).
* Added "--[no-]preserve" as shortcuts for both options in one.
* Fixed option descriptions as they had typos and were too ambiguous
  ("extract information" to where? separate file?).
* Added --force option to allow extracting directly to root path.

Fixes: 412c8f908132 ("erofs-utils: fsck: add --extract=X support to extract to path X")
Link: https://lore.kernel.org/r/20220128040511.27-1-igoreisberg@gmail.com
Link: https://lore.kernel.org/r/20220128044613.26-1-igoreisberg@gmail.com
Link: https://lore.kernel.org/r/20220128045018.26-1-igoreisberg@gmail.com
Link: https://lore.kernel.org/r/20220128160036.101-1-igoreisberg@gmail.com
Signed-off-by: Igor Ostapenko <igoreisberg@gmail.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Change-Id: I80c63a2b8eac71fe5ff664a5edc18856960d39a6
1 file changed