search for: find_key

Displaying 4 results from an estimated 4 matches for "find_key".

2007 Sep 18
1
program to monitor USB keys
...nt_keys[0].type, event_keys[0].value, event_keys[0].code); //printf("U %d %d %d\n", event_keys[1].type, event_keys[1].value, event_keys[1].code); if(event_keys[0].type == 1 && event_keys[0].value == 1) { keycode = event_keys[0].code; for(find_key = 0; msgnet_keycode[find_key].keycode_str; find_key++) { if(msgnet_keycode[find_key].keycode_value == keycode) { KeyLog(find_key); break; } } } } else if(bytes_read < 0) { if(errno == EAGAIN) {...
2015 Nov 17
0
[PATCH 2/3] v2v: windows: Add a Windows '*.inf' file parser.
...lines = List.map ( + fun (key, value) -> + String.lowercase_ascii key, value + ) lines in + header, lines + ) sections in + + sections + +let find_section t section_name = + let section_name = String.lowercase_ascii section_name in + List.assoc section_name t + +let find_key t section_name key_name = + let data = find_section t section_name in + let key_name = String.lowercase_ascii key_name in + List.assoc key_name data + +let load filename = + of_string (read_whole_file filename) + +let rec to_string sections = + String.concat "\n" (List.map string_of_...
2015 Nov 17
8
[PATCH 0/3] v2v: windows: Use '*.inf' files to control how Windows drivers are installed.
https://github.com/rwmjones/libguestfs/tree/rewrite-virtio-copy-drivers Instead of trying to split and parse elements from virtio-win paths, use the '*.inf' files supplied with the drivers to control how Windows drivers are installed. The following emails best explain how this works: https://www.redhat.com/archives/libguestfs/2015-October/msg00352.html
2015 Nov 17
0
[PATCH 3/3] v2v: windows: Use '*.inf' files to control how Windows drivers are installed.
...pathelem "win10" then - (10, 0, is_client) - else - raise Not_found in - - arch = p_arch && os_major = p_os_major && os_minor = p_os_minor && - match_os_variant os_variant - - with Not_found -> false + let driver_ver = Windows_inf.find_key sections "Version" "DriverVer" in + if Str.string_match driver_ver_rex driver_ver 0 then + Some (int_of_string (Str.matched_group 1 driver_ver)) + else + raise Not_found + with + Not_found -> + warning (f_"%s: could not find or parse the [Version...