Re: [PATCH] Adds the ability to abort an MD5 sum check.

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

 



> If the user presses [ENTER] then the check will exit. The return code
> will be 2 and a message stating the check was aborted displayed to the
> user.

If we're going to start having mediaCheckFile return extra codes instead
of just zero and non-zero, we should add #defines to libcheckisomd5.h to
give these codes names.  That'll help insulate anaconda from potential
future changes a bit.

Enter seems a little weird for an abort key stroke.  Is there a reason
you picked that over escape, ctrl-d, or something else that users might
already be familiar with?

> -static void outputCB(void *co, long long offset, long long total) {
> +int user_bailing_out() {
> +  int retval = 0;
> +  struct timeval timev;
> +  fd_set rfds;
> +
> +  FD_ZERO(&rfds);
> +  FD_SET(0,&rfds);
> +
> +  timev.tv_sec = 0;
> +  timev.tv_usec = 0;
> +
> +  retval = select(1, &rfds, NULL, NULL, &timev);
> +
> +  return retval;
> +}

Ah, I see, you're not really just looking for enter so much as you're
looking for any keystroke.  Probably fine then.

- 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