fsck: don't apply invalid mode or repair values
fsck_mode_from_string() and fsck_repair_from_string() return -EINVAL
on a bad value. Store the result in a local variable first, and only
update the global state on success.
Otherwise an invalid value is logged as ignored, but still leaves a
negative enum value behind. In the fsck.repair case that makes
fsck_repair_option_to_string() return NULL and truncates the fsck
command line.
Follow-up for
a85428b1d325654dc7e1afbabf4b689bd31116f5
Follow-up for
059afcadfd89c6c302f20c9ac1a1c44592b716df
Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>