kdrive: don't let evdev driver overwrite existing device names
KDrive evdev driver deliberately name grabbed devices as "Evdev mouse" or "Evdev keyboard". This patch will make it skip this step if grabbed devices are already named (i.e. from udev). Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
This commit is contained in:
parent
0b80da0d18
commit
edd443f69e
|
@ -220,7 +220,8 @@ EvdevPtrInit(KdPointerInfo * pi)
|
|||
|
||||
close(fd);
|
||||
|
||||
pi->name = strdup("Evdev mouse");
|
||||
if (!pi->name)
|
||||
pi->name = strdup("Evdev mouse");
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
@ -390,7 +391,8 @@ EvdevKbdInit(KdKeyboardInfo * ki)
|
|||
|
||||
close(fd);
|
||||
|
||||
ki->name = strdup("Evdev keyboard");
|
||||
if (!ki->name)
|
||||
ki->name = strdup("Evdev keyboard");
|
||||
|
||||
readMapping(ki);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user