aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiomidis Spinellis <dds@FreeBSD.org>2005-07-21 16:12:35 +0000
committerDiomidis Spinellis <dds@FreeBSD.org>2005-07-21 16:12:35 +0000
commit153fdc98cfca54f8542840b9c60cc6d8ca27142c (patch)
treeb57fa9338f460a5ce8f050db53948cfae8061d59
parent0da71daba6a0d3526c59d6d0f85be06af0f212ca (diff)
Notes
-rw-r--r--sbin/restore/interactive.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/restore/interactive.c b/sbin/restore/interactive.c
index d3ab5cdcf8a1b..e3391d0eb77cd 100644
--- a/sbin/restore/interactive.c
+++ b/sbin/restore/interactive.c
@@ -365,8 +365,14 @@ getnext:
snprintf(output, sizeof(output), "%s/%s", curdir, rawname);
canon(output, name, size);
}
- if (glob(name, GLOB_ALTDIRFUNC, NULL, &ap->glob) < 0)
+ switch (glob(name, GLOB_ALTDIRFUNC, NULL, &ap->glob)) {
+ case GLOB_NOSPACE:
fprintf(stderr, "%s: out of memory\n", ap->cmd);
+ break;
+ case GLOB_NOMATCH:
+ fprintf(stderr, "%s %s: no such file or directory\n", ap->cmd, name);
+ break;
+ }
if (ap->glob.gl_pathc == 0)
return;
ap->freeglob = 1;