mirror of
https://github.com/utmapp/vd_agent.git
synced 2026-12-01 14:02:07 -10:00
Add an explicit switch to signal fake uinput devices.
Signed-off-by: Jeremy White <[email protected]>
This commit is contained in:
1 parent
7d858d5064
commit
251637aa23
1 file changed
+5
-6
+5
-6
@@ -756,6 +756,7 @@ static void usage(FILE *fp)
|
||||
" -s <port> set virtio serial port [%s]\n"
|
||||
" -S <filename> set udcs socket [%s]\n"
|
||||
" -u <dev> set uinput device [%s]\n"
|
||||
" -f treat uinput device as fake; no ioctls\n"
|
||||
" -x don't daemonize\n"
|
||||
#ifdef HAVE_CONSOLE_KIT
|
||||
" -X Disable console kit integration\n"
|
||||
@@ -865,7 +866,7 @@ int main(int argc, char *argv[])
|
||||
struct sigaction act;
|
||||
|
||||
for (;;) {
|
||||
if (-1 == (c = getopt(argc, argv, "-dhxXs:u:S:")))
|
||||
if (-1 == (c = getopt(argc, argv, "-dhxXfs:u:S:")))
|
||||
break;
|
||||
switch (c) {
|
||||
case 'd':
|
||||
@@ -880,6 +881,9 @@ int main(int argc, char *argv[])
|
||||
case 'u':
|
||||
uinput_device = optarg;
|
||||
break;
|
||||
case 'f':
|
||||
uinput_fake = 1;
|
||||
break;
|
||||
case 'x':
|
||||
do_daemonize = 0;
|
||||
break;
|
||||
@@ -896,11 +900,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (strncmp(uinput_device, "/dev", 4) != 0) {
|
||||
syslog(LOG_INFO, "using fake uinput");
|
||||
uinput_fake = 1;
|
||||
}
|
||||
|
||||
memset(&act, 0, sizeof(act));
|
||||
act.sa_flags = SA_RESTART;
|
||||
act.sa_handler = quit_handler;
|
||||
|
||||
Reference in new issue
Block a user