woking on linux kernel 5 yay
This commit is contained in:
parent
52d8339f4b
commit
1f80d3ddec
@ -1,9 +1 @@
|
||||
ACTION!="add",\
|
||||
DRIVERS=="fjveincam",\
|
||||
MODE="0666",
|
||||
SUBSYSTEM=="usb",\
|
||||
ATTRS{idVendor}=="04c5",\
|
||||
ATTRS{idProduct}=="1526",\
|
||||
SYMLINK+="usb/fjveincam%n",\
|
||||
RUN+="/bin/bash -c 'date >> /tmp/fjpv'",\
|
||||
RUN+="/bin/bash -c 'echo $kernel _ $devpath _ $number id=$id MM=$major:$minor $name $sys >> /tmp/fjpv'"
|
||||
SUBSYSTEM=="usbmisc", KERNEL=="fjveincam*", ACTION=="add", MODE="0666", SYMLINK+="usb/fjveincam0"
|
||||
|
||||
@ -3,6 +3,7 @@ make clean
|
||||
make
|
||||
make install
|
||||
cp fjveincam.ko /usr/lib/modules/`uname -r`/kernel/drivers/usb/misc/
|
||||
cp 93-unicon-palmvene.rules /usr/lib/udev/rules.d/
|
||||
#cp 93-unicon-palmvene.rules /usr/lib/udev/rules.d/
|
||||
cp 93-unicon-palmvene.rules /etc/udev/rules.d/
|
||||
insmod fjveincam.ko
|
||||
depmod
|
||||
|
||||
@ -14,9 +14,16 @@ int main(int argc, char ** argv) {
|
||||
int status = 0;
|
||||
int fd = 0;
|
||||
char fname[] = "/dev/usb/fjveincam\0\0";
|
||||
//char fname[] = "/dev/bus/usb//004/01\0\0";
|
||||
char * p1 = fname;
|
||||
char * p2 = 0;
|
||||
|
||||
if (argc<2){
|
||||
printf("Error. Syntax is %s device# (eg 0,1,2)\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
memset(&info,1,sizeof(struct fjveincam_info));
|
||||
p2 = argv[1];
|
||||
*(p1+strlen(p1))=*p2;
|
||||
@ -46,7 +53,8 @@ int main(int argc, char ** argv) {
|
||||
|
||||
if (status < 0) {
|
||||
perror("ioctl");
|
||||
printf("Failed to call function in kernel module with IOCTL code %lu\n",(unsigned long)USB_FJVEINCAMV30_IOCTL_CHECK,status);
|
||||
printf("Failed to call function in kernel module with IOCTL code %lu status %d\n",
|
||||
(unsigned long)USB_FJVEINCAMV30_IOCTL_CHECK,status);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
1035
modules/fjpalmvein/C/fjpalmvein-main/fjveincam.c
Normal file → Executable file
1035
modules/fjpalmvein/C/fjpalmvein-main/fjveincam.c
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user