mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtprintinfo: Use CUPS lpq for FreeBSD
Use /usr/local/bin/lpq from CUPS for FreeBSD for now; this prevents immediate dtprintinfo crash. In the future we should handle both built-in /usr/bin/lpq as well as CUPS /usr/local/bin/lpq output in separate functions. Code to support CUPS should probably shared between other operating systems.
This commit is contained in:
parent
6ea7855841
commit
fc0f1ff697
1 changed files with 4 additions and 2 deletions
|
@ -870,8 +870,10 @@ void LocalPrintJobs(char *printer, char **return_job_list, int *return_n_jobs)
|
|||
#if defined(__osf__)
|
||||
sprintf(buf, "lpstat -o%s", printer);
|
||||
#endif
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
sprintf(buf, "lpq -P%s", printer);
|
||||
#if defined(linux) || defined(__OpenBSD__)
|
||||
snprintf(buf, 1000, "lpq -P%s", printer);
|
||||
#elif defined(__FreeBSD__)
|
||||
snprintf(buf, 1000, "/usr/local/bin/lpq -P%s", printer);
|
||||
#endif
|
||||
|
||||
Invoke *_thread = new Invoke(buf, &output);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue