diff options
author | Garance A Drosehn <gad@FreeBSD.org> | 2001-06-25 02:05:03 +0000 |
---|---|---|
committer | Garance A Drosehn <gad@FreeBSD.org> | 2001-06-25 02:05:03 +0000 |
commit | 004c9c5da2723f154106e8955ce5d05250f8e94e (patch) | |
tree | 5359327b2674f5a90ee19ea58cfbc8d4d7f0864c /usr.sbin/lpr/lpc/extern.h | |
parent | 6ddb63cad6151fb843c139f45cae730baf10148c (diff) |
Make 'lpc clean' somewhat safer. Add an 'lpc tclean' command, which allows
one to see what files would be removed *if* an 'lpc clean' is done. 'tclean'
will remove no files, and is therefore not a privileged command. Also, both
'lpc clean' and 'lpc tclean' will now look for 'core' files in spool directories
(but not remove them). They also print out an extra line of info when a
datafile to be removed is a symlink (from 'lpr -s'), saying what file it is
a symlink to.
The 'lpc clean' commands also now print out a summary line saying how many
queues were checked, how many files were removed (or "would be" removed, for
tclean), and how much disk space is involved. For the benefit of those who
have many print queues, 'lpc clean all' will only print out the names of print
queues where some "interesting" files were found, instead of printing out a
header-line for every queue in your printcap file.
Reviewed by: freebsd-print@bostonradio.org freebsd-audit@FreeBSD.org
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=78750
Diffstat (limited to 'usr.sbin/lpr/lpc/extern.h')
-rw-r--r-- | usr.sbin/lpr/lpc/extern.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/lpr/lpc/extern.h b/usr.sbin/lpr/lpc/extern.h index ffcfd3263298..229d9e5015d9 100644 --- a/usr.sbin/lpr/lpc/extern.h +++ b/usr.sbin/lpr/lpc/extern.h @@ -42,14 +42,17 @@ __BEGIN_DECLS -void clean(struct printer *_pp); +void clean_q(struct printer *_pp); void disable(struct printer *_pp); void doabort(struct printer *_pp); void down(int _argc, char *_argv[]); void enable(struct printer *_pp); -void generic(void (*_specificrtn)(struct printer *_pp), int _argc, - char *_argv[]); +void generic(void (*_specificrtn)(struct printer *_pp), + void (*_initcmd)(int _argc, char *_argv[]), + int _argc, char *_argv[]); void help(int _argc, char *_argv[]); +void init_clean(int _argc, char *_argv[]); +void init_tclean(int _argc, char *_argv[]); void quit(int _argc, char *_argv[]); void restart(struct printer *_pp); void startcmd(struct printer *_pp); |