mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-16 23:20:22 +02: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:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user