Re: [PATCH 3/3] Improve message given to user for fsck failures (#527626).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -486,8 +490,30 @@ class FS(DeviceFormat):
>              if w:
>                  w.pop()
>  
> -        if rc >= 4:
> -            raise FSError("filesystem check failed: %s" % rc)
> +        if self._fsckFailed(rc):
> +            hdr = _("%(type)s filesystem check failure on %(device)s: ") % \
> +                   (self.type, self.device,)
> +
> +            if rc in self._fsckErrors.keys():
> +                msg = self._fsckErrors[rc]
> +            else:
> +                msg = _("Unknown return code: %d.") % (rc,)
> +
> +            if intf:
> +                help = _("Errors like this usually mean there is a problem "
> +                         "with the filesystem that will require user "
> +                         "interaction to repair.  Before restarting "
> +                         "installation, reboot to rescue mode or another "
> +                         "system that allows you to repair the filesystem "
> +                         "interactively.  Restart installation after you "
> +                         "have correct the problems on the filesystem.")
> +
> +                self.intf.messageWindow(_("Unrecoverable Error"),
> +                                        hdr + "\n\n" + msg + "\n\n" + help,
> +                                        custom_icon='error')
> +                sys.exit(0)
> +            else:
> +                raise FSError(hdr + msg)
>  
>      def loadModule(self):
>          """Load whatever kernel module is required to support this filesystem."""

You may need to be a little fancier than this:  at least according to
"man resize2fs", the error codes are OR'ed together, so I guess it's
possible several could happen at the same time.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux