Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/loginutils/vlock.c

    r2725 r3232  
    1515/* Fixed by Erik Andersen to do passwords the tinylogin way...
    1616 * It now works with md5, sha1, etc passwords. */
     17
     18//usage:#define vlock_trivial_usage
     19//usage:       "[-a]"
     20//usage:#define vlock_full_usage "\n\n"
     21//usage:       "Lock a virtual terminal. A password is required to unlock.\n"
     22//usage:     "\n    -a  Lock all VTs"
    1723
    1824#include "libbb.h"
     
    94100    tcsetattr_stdin_TCSANOW(&term);
    95101
    96     do {
     102    while (1) {
    97103        printf("Virtual console%s locked by %s.\n",
    98                 option_mask32 /*o_lock_all*/ ? "s" : "",
    99                 pw->pw_name);
     104                /* "s" if -a, else "": */ "s" + !option_mask32,
     105                pw->pw_name
     106        );
    100107        if (correct_password(pw)) {
    101108            break;
    102109        }
    103         bb_do_delay(FAIL_DELAY);
    104         puts("Password incorrect");
    105     } while (1);
     110        bb_do_delay(LOGIN_FAIL_DELAY);
     111        puts("Incorrect password");
     112    }
    106113
    107114#ifdef __linux__
Note: See TracChangeset for help on using the changeset viewer.