diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-07-30 01:08:34 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-07-30 01:08:34 +0000 |
| commit | 573999ad8a6b48e772610c5743d5f6f838bc87d7 (patch) | |
| tree | 110ad289fe03ba53f339f49b5a9da5e05d0ff27b /usr.sbin/pkg_install | |
| parent | 3c9c80297334b7c06b46f4ae620202872afe43e5 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/pkg_install')
| -rw-r--r-- | usr.sbin/pkg_install/info/show.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/pkg_install/info/show.c b/usr.sbin/pkg_install/info/show.c index b1c29b3d1ca5..d4d4f3f7143e 100644 --- a/usr.sbin/pkg_install/info/show.c +++ b/usr.sbin/pkg_install/info/show.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: show.c,v 1.5 1995/01/05 01:10:13 swallace Exp $"; +static const char *rcsid = "$Id: show.c,v 1.6 1995/05/30 03:50:02 rgrimes Exp $"; #endif /* @@ -35,13 +35,13 @@ show_file(char *title, char *fname) if (!Quiet) printf("%s%s", InfoPrefix, title); fp = fopen(fname, "r"); - if (!fp) { - whinge("show_file: Can't open '%s' for reading.", fname); - return; + if (!fp) + printf("ERROR: show_file: Can't open '%s' for reading!\n", fname); + else { + while (n = fread(line, 1, 1024, fp)) + fwrite(line, 1, n, stdout); + fclose(fp); } - while (n = fread(line, 1, 1024, fp)) - fwrite(line, 1, n, stdout); - fclose(fp); printf("\n"); /* just in case */ } |
