--noprinter option

This commit is contained in:
netblue30 2021-10-20 20:05:58 -04:00
parent 72e90164ec
commit bd15e763ea
2 changed files with 9 additions and 0 deletions

View file

@ -2156,6 +2156,10 @@ int main(int argc, char **argv, char **envp) {
arg_novideo = 1;
else if (strcmp(argv[i], "--no3d") == 0)
arg_no3d = 1;
else if (strcmp(argv[i], "--noprinter") == 0) {
profile_add("blacklist /dev/lp*");
profile_add("blacklist /run/cups/cups.sock");
}
else if (strcmp(argv[i], "--notv") == 0)
arg_notv = 1;
else if (strcmp(argv[i], "--nodvd") == 0)

View file

@ -449,6 +449,11 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
arg_no3d = 1;
return 0;
}
else if (strcmp(ptr, "noprinter") == 0) {
profile_add("blacklist /dev/lp*");
profile_add("blacklist /run/cups/cups.sock");
return 0;
}
else if (strcmp(ptr, "noinput") == 0) {
arg_noinput = 1;
return 0;