summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/printing/nt_printing.c')
-rw-r--r--source3/printing/nt_printing.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 0c9526b1ec..c70ed20998 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -614,6 +614,21 @@ static void save_specifics(NT_PRINTER_PARAM *param, int fd)
}
}
+
+/****************************************************************************
+delete a printer - this just deletes the printer info file, any open
+handles are not affected
+****************************************************************************/
+uint32 del_a_printer(char *portname)
+{
+ pstring file;
+
+ slprintf(file, sizeof(file), "%s/NTprinter_%s",
+ lp_nt_drivers_file(), portname);
+ if (unlink(file) != 0) return 2;
+ return 0;
+}
+
/****************************************************************************
****************************************************************************/
static uint32 add_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info)