gio-tool-mount: Exit with error in case we can't read from stdin

It's a fatal situation so we can just exit without caring much.
This commit is contained in:
Marco Trevisan (Treviño) 2022-07-06 16:04:47 +02:00
parent 0e4d8c2478
commit a5390002fc

View File

@ -112,7 +112,8 @@ prompt_for (const char *prompt, const char *default_value, gboolean echo)
#endif
fgets(data, sizeof (data), stdin);
if (!fgets (data, sizeof (data), stdin))
g_error ("Failed to read from standard input");
#ifdef HAVE_TERMIOS_H
if (restore_flags)