/* $Id$ * $URL$ * * plugin that forks and exec's once a key is pressed. the difference to the exec plugin is: this can also only be done once! * * Copyright (C) 2008, Wolfgang Henerbichler * * This file is part of LCD4Linux. * * LCD4Linux is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * LCD4Linux is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * exported functions: * * int plugin_init_button_exec(void) * adds various functions * */ /* define the include files you need */ #include "config.h" #include #include #include #include #include #include /* these should always be included */ #include "debug.h" #include "plugin.h" #ifdef WITH_DMALLOC #include #endif /* sample function 'button_exec' */ /* takes as many arguments as you want, first arguemnt is the command that will be called via exec, all the following are parameters you want to add to your command - you won't know what has happened after forking - no return codes available */ /* Note: all local functions should be declared 'static' */ static void my_button_exec(RESULT * result, int argc, RESULT * argv[]) { int pid; int i; int errsv; char *args[argc + 1]; char *arg; char *prog; signal(SIGCHLD, SIG_IGN); prog = R2S(argv[0]); info(prog); for (i = 1; i < argc; i++) { arg = R2S(argv[i]); args[i] = arg; info(arg); } args[0] = prog; args[i] = (char *) 0; pid = fork(); if (pid == 0) { /* child-process */ /* char *args[] = {"-r", "-t", "-l", (char *) 0 }; */ info("executing program"); execvp(prog, args); errsv = errno; info("executing program failed"); info(strerror(errsv)); exit(0); } else if (pid == -1) { info("weird error has occured. couldn't fork."); } else { SetResult(&result, R_STRING, "0"); } } /* plugin initialization */ /* MUST NOT be declared 'static'! */ int plugin_init_button_exec(void) { /* register all our cool functions */ /* the second parameter is the number of arguments */ /* -1 stands for variable argument list */ AddFunction("button_exec", -1, my_button_exec); return 0; } void plugin_exit_button_exec(void) { /* free any allocated memory */ /* close filedescriptors */ } wmsg=1'>unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2024-01-30dtv-scan-tables: full uk transmitter updateSimon Liddicott81-500/+163
updates all transmitter files, removes discontinued muxes Link: https://lore.kernel.org/linux-media/20230216010528.5921-1-simon@liddicott.com Signed-off-by: Simon Liddicott <simon@liddicott.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-11-25dtv-scan-tables: hu-Digikabel changesHrotkó Gábor1-1/+26
Modifications by: https://digi.hu/tv/csatornalista FREQUENCY = 121000000 Link: https://lore.kernel.org/linux-media/8c632dad-d428-402e-a171-baf7234f2d85@gmail.com Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-30pt-All: fix modulationMauro Carvalho Chehab1-10/+10
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-30pt-All: Update Portugal channelsMauro Carvalho Chehab1-34/+70
There were some changes at Portugal channel frequencies, mostly in 2020. Update the DVB-T channel list accordingly, in order to reflect the current list of emitters. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-07Update Brazilian ISDB-T tablesMauro Carvalho Chehab549-2923/+13860
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-07Update satellite channel lists from LyngsatMauro Carvalho Chehab54-1882/+2326
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2021-12-14dtv-scan-tables: latest UK changesSimon Liddicott4-24/+24
only includes transmitters where there have been changes Link: https://lore.kernel.org/linux-media/20210128234622.75009-1-simon@liddicott.com Signed-off-by: Simon Liddicott <simon@liddicott.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-30update Brazilian scan filesMauro Carvalho Chehab2476-12805/+69312
Data updated according with https://portalbsd.com.br/. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-30Remove legacy entriesMauro Carvalho Chehab129-24898/+0
There are several entries that used to be at Lyngsat. Several of them were merged with other entries. On others, there's no TV signal anymore. So, drop them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-30Add new satellites from LyngsatMauro Carvalho Chehab75-21/+29721
Those are are new satellite descriptions that didn't use to exist on Lyngsat. Add them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-30Rename a few satellites with two names and update frequenciesMauro Carvalho Chehab2-283/+182
Those two satellites have two names. Use Just one of them. While here, update their frequencies from Lyngsat. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-30Update frequencies from LyngsatMauro Carvalho Chehab188-12304/+12666
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>