mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
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:
parent
0e4d8c2478
commit
a5390002fc
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user