summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorsonam gupta - Sun Microsystems - Bangalore India <Sonam.Gupta@Sun.COM>2009-09-24 11:23:12 +0530
committersonam gupta - Sun Microsystems - Bangalore India <Sonam.Gupta@Sun.COM>2009-09-24 11:23:12 +0530
commit7380b00ccf9fc5638da98d756925bc6d6c002a42 (patch)
tree4d7358b77f16823e12f09b6ab9af6b8e26b3208d /usr/src
parent9c865d645a5c60028aed172eea31ca36d81a2ff1 (diff)
downloadillumos-joyent-7380b00ccf9fc5638da98d756925bc6d6c002a42.tar.gz
6863498 The "standard input" doesn't get printed to "Title:" even if the data is given to lp via its stdin
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/lp/cmd/lpsched/disp1.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/usr/src/cmd/lp/cmd/lpsched/disp1.c b/usr/src/cmd/lp/cmd/lpsched/disp1.c
index 1cf7c2237e..da9a3323fb 100644
--- a/usr/src/cmd/lp/cmd/lpsched/disp1.c
+++ b/usr/src/cmd/lp/cmd/lpsched/disp1.c
@@ -226,17 +226,14 @@ s_print_request(char *m, MESG *md)
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");
}
}