Open githubmc opened 7 years ago
The current code of the virtual loopback driver virtual-loopback-async (tty0tty.c, version 1.2) is for the kernel 3.XX. Code can not be compiled with the kernel 2.6.22.
For the linux kernel 2.6.22, we can use the tty0tty.c, version 1.0, downloaded from https://sourceforge.net/projects/tty0tty. The XML test cases related to "write" works fine. But the XML test cases related to "read" does not work. This issue is: There are many XML scripts has this similar code section: FPUIInput file="@Cxxxx_key1.txt" description="Provide keypress [1] input" Sleep time="%1" Call ref="fpui_read_char" setUp="API_Init_Variables"
I trace the code and see that FPUIInput parsed data from the file Cxxxx_key1.txt correctly, but this data is not fed as the input to fpui_read_char().
Do you have similar issue when running the XML script with the virtual-loopback-async (tty0tty.c, version 1.2) and the kernel 3.XX ?
I exclude the calls of device_create() in the function vl_sync_init_dev(), and class_create() in the function vl_sync_init() of the file virtual-loopback-sync.c to make the sync virtual loopback driver work with Linux 2.6.22.
Definitions in device.h has changed a lot since the 2.6 kernel. There are compilations errors when compile this file (virtual-loopback-sync.c) with the kernel 2.6.22. static int __init vl_sync_init(void) { ........... vl_sync_class->devnode = vl_sync_devnode; ........... return retval; }
tty_struct structure has changed since the 2.6 kernel. There are compilations errors when compile this file (virtual-loopback-async.c) with the kernel 2.6.22. tty0ttyTV.c:69: error: array type has incomplete element type tty0ttyTV.c: In function 'tty0tty_open': tty0ttyTV.c:120: error: 'struct tty_struct' has no member named 'port' tty0ttyTV.c:288: error: request for member 'c_cflag' in something not a structure or union tty0ttyTV.c:293: error: request for member 'c_iflag' in something not a structure or union