diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-02-08 01:21:16 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-02-08 01:21:16 +0000 |
commit | 9d007935a92f56f6470a9f677afc7fb05f17d0b3 (patch) | |
tree | ecf92f9d993ea4a8eaec30293ff093e312d75123 /hcid/parser.y | |
parent | a388c640dd22bb07bd899cd32883bc42b16c430a (diff) |
Remove usage of /etc/bluetooth/{pin|link_key} files
Diffstat (limited to 'hcid/parser.y')
-rw-r--r-- | hcid/parser.y | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hcid/parser.y b/hcid/parser.y index 948793cb..2697559f 100644 --- a/hcid/parser.y +++ b/hcid/parser.y @@ -61,7 +61,7 @@ int yyerror(char *s); %token K_OPTIONS K_DEVICE %token K_AUTOINIT K_SECURITY K_PAIRING %token K_PTYPE K_NAME K_CLASS K_VOICE K_INQMODE K_PAGETO K_LM K_LP K_AUTH K_ENCRYPT K_ISCAN K_PSCAN -%token K_PINHELP K_DBUSPINHELP +%token K_PINCODE K_PINHELP K_DBUSPINHELP %token K_YES K_NO %token <str> WORD PATH STRING LIST HCI BDADDR @@ -115,6 +115,13 @@ hcid_opt: hcid.pairing = $2; } + | K_PINCODE STRING { + strncpy((char *) hcid.pin_code, $2, 16); + hcid.pin_len = strlen($2); + if (hcid.pin_len > 16) + hcid.pin_len = 16; + } + | K_PINHELP PATH { if (hcid.pin_helper) free(hcid.pin_helper); |