diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-06-18 12:26:46 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-06-18 12:26:46 +0300 |
commit | 920ad1e57ca64fe4e513eb32080250f3866da14f (patch) | |
tree | d4525770725b433af1b5352975d2fa8e6e78cfc1 | |
parent | cd76915e1cbdbc0608db830a74c4cc70c372b8df (diff) | |
download | paxutils-920ad1e57ca64fe4e513eb32080250f3866da14f.tar.gz |
Minor fix.
* lib/rtapelib.c (rmt_open__): Return appropriate diagnostics if
the host name cannot be resolved.
-rw-r--r-- | lib/rtapelib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rtapelib.c b/lib/rtapelib.c index 51faf3c..02ad1e7 100644 --- a/lib/rtapelib.c +++ b/lib/rtapelib.c @@ -425,7 +425,10 @@ rmt_open__ (const char *file_name, int open_mode, int bias, } /* FIXME: Should somewhat validate the decoding, here. */ - + if (gethostbyname (remote_host) == NULL) + error (EXIT_ON_EXEC_ERROR, 0, _("Cannot connect to %s: resolve failed"), + remote_host); + if (remote_user && *remote_user == '\0') remote_user = 0; |