mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
small code shrink
This commit is contained in:
parent
64e619c0c8
commit
f60d62638b
@ -56,12 +56,11 @@ int microcom_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// open device
|
// open device
|
||||||
sfd = open(argv[0], O_RDWR | O_NDELAY);
|
sfd = open(argv[0], O_RDWR);
|
||||||
if (sfd < 0) {
|
if (sfd < 0) {
|
||||||
bb_perror_msg("can't open device");
|
bb_perror_msg("can't open device");
|
||||||
goto unlock_and_exit;
|
goto unlock_and_exit;
|
||||||
}
|
}
|
||||||
fcntl(sfd, F_SETFL, O_RDWR); // why?
|
|
||||||
|
|
||||||
// put stdin to "raw mode", handle one character at a time
|
// put stdin to "raw mode", handle one character at a time
|
||||||
tcgetattr(STDIN_FILENO, &tio0);
|
tcgetattr(STDIN_FILENO, &tio0);
|
||||||
|
Loading…
Reference in New Issue
Block a user