FreeBSD Bugzilla – Attachment 27294 Details for
Bug 46328
[patch] patch for lpd(8)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.46 KB, created by
wkwu
on 2002-12-17 13:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
wkwu
Created:
2002-12-17 13:10:01 UTC
Size:
1.46 KB
patch
obsolete
>--- usr.sbin/lpr/lpd/printjob.c Thu Jun 20 16:27:38 2002 >+++ usr.sbin/lpr/lpd/printjob.c.new Tue Dec 17 20:50:50 2002 >@@ -882,6 +882,24 @@ > int dfcopies, err, i; > char *cp, last[BUFSIZ]; > >+ /* >+ * FreeBSD's cf files may put the 'N'(or 'J') after the 'f' line >+ * open control file for Parsing the jobname first >+ */ >+ if ((cfp = fopen(file, "r")) == NULL) >+ return (OK); >+ >+ while (getline(cfp)) { >+ if (line[0] == 'J' || line[0] == 'N') { >+ if (line[1] != '\0') { >+ strlcpy(jobname, line + 1, sizeof(jobname)); >+ } else >+ strcpy(jobname, "(standard in)"); >+ break; >+ } >+ } >+ fclose(cfp); >+ > /* > * open control file > */ >@@ -988,8 +1006,8 @@ > { > int i, amt; > struct stat stb; >- char *av[15], *filtcmd; >- char buf[BUFSIZ], opt_c[4], opt_h[4], opt_n[4]; >+ char *av[17], *filtcmd; >+ char buf[BUFSIZ], opt_c[4], opt_h[4], opt_j[4], opt_n[4]; > int copycnt, filtstat, narg, resp, sfd, sfres, sizerr, statrc; > > statrc = lstat(file, &stb); >@@ -1048,6 +1066,7 @@ > narg = 0; > strcpy(opt_c, "-c"); > strcpy(opt_h, "-h"); >+ strcpy(opt_j, "-j"); > strcpy(opt_n, "-n"); > if (format == 'l') > av[++narg] = opt_c; >@@ -1058,6 +1077,8 @@ > av[++narg] = logname; > av[++narg] = opt_h; > av[++narg] = origin_host; >+ av[++narg] = opt_j; >+ av[++narg] = jobname; > av[++narg] = pp->acct_file; > av[++narg] = NULL; > } else if (pp->filters[LPF_OUTPUT]) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46328
: 27294