diff options
author | jkh <jkh@FreeBSD.org> | 1997-01-13 10:14:26 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-01-13 10:14:26 +0000 |
commit | bb745a330e63e78f87f00c2301ccc450408453d2 (patch) | |
tree | 8684c1270e05eabce1bdbf873095a5c1cff801d9 | |
parent | 6f001ae28e0c8418afde8783bbc6ac4f8a85293a (diff) | |
download | FreeBSD-src-bb745a330e63e78f87f00c2301ccc450408453d2.zip FreeBSD-src-bb745a330e63e78f87f00c2301ccc450408453d2.tar.gz |
Correct a problem which broke +DISPLAY file handling.
-rw-r--r-- | usr.sbin/pkg_install/add/perform.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c index 95e4ac7..f45b598 100644 --- a/usr.sbin/pkg_install/add/perform.c +++ b/usr.sbin/pkg_install/add/perform.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: perform.c,v 1.36 1996/07/31 21:52:33 jkh Exp $"; +static const char *rcsid = "$Id: perform.c,v 1.37 1996/10/14 19:41:42 jkh Exp $"; #endif /* @@ -401,7 +401,8 @@ pkg_do(char *pkg) FILE *fp; char buf[BUFSIZ]; - fp = fopen(p->name, "r"); + snprintf(buf, sizeof buf, "%s/%s", LogDir, p->name); + fp = fopen(buf, "r"); if (fp) { putc('\n', stdout); while (fgets(buf, sizeof(buf), fp)) @@ -409,7 +410,7 @@ pkg_do(char *pkg) putc('\n', stdout); (void) fclose(fp); } else - whinge("Cannot open display file `%s'.", p->name); + whinge("Cannot open %s as display file.", buf); } goto success; |