Mercurial > illumos > illumos-gate
changeset 10634:6f69eed61369
6863498 The "standard input" doesn't get printed to "Title:" even if the data is given to lp via its stdin
author | sonam gupta - Sun Microsystems - Bangalore India <Sonam.Gupta@Sun.COM> |
---|---|
date | Thu, 24 Sep 2009 11:23:12 +0530 |
parents | 62ff2de09191 |
children | bff95ace2bd8 |
files | usr/src/cmd/lp/cmd/lpsched/disp1.c |
diffstat | 1 files changed, 6 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/lp/cmd/lpsched/disp1.c Wed Sep 23 22:00:30 2009 -0700 +++ b/usr/src/cmd/lp/cmd/lpsched/disp1.c Thu Sep 24 11:23:12 2009 +0530 @@ -226,17 +226,14 @@ rp->request->title = Strdup(*rp->request->file_list); else { - char *r; - - if (r = strrchr( - *rp->request->file_list, '/')) - r++; - else - r = *rp->request->file_list; - + /* + * In case of standard input + * the title page should be + * 'standard input' + */ rp->request->title = malloc(25); sprintf(rp->request->title, - "%-.24s", r); + "%-.24s", "standard input"); } }