mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +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
|
#endif
|
||||||
|
|
||||||
fgets(data, sizeof (data), stdin);
|
if (!fgets (data, sizeof (data), stdin))
|
||||||
|
g_error ("Failed to read from standard input");
|
||||||
|
|
||||||
#ifdef HAVE_TERMIOS_H
|
#ifdef HAVE_TERMIOS_H
|
||||||
if (restore_flags)
|
if (restore_flags)
|
||||||
|
Loading…
Reference in New Issue
Block a user