mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-16 18:44:17 +00:00
Implement dev option -c */[ASsrt] skeleton
Also changed usbdev, usbsn, usbvendor and usbproduct components from PROGRAMMER structure to be cached string pointers rather than fixed-size arrays. These will be initialised by pgm_new() with a pointer to nul;
This commit is contained in:
@@ -532,8 +532,7 @@ prog_parm_conntype_id:
|
||||
prog_parm_usb:
|
||||
K_USBDEV TKN_EQUAL TKN_STRING {
|
||||
{
|
||||
strncpy(current_prog->usbdev, $3->value.string, PGM_USBSTRINGLEN);
|
||||
current_prog->usbdev[PGM_USBSTRINGLEN-1] = 0;
|
||||
current_prog->usbdev = cache_string($3->value.string);
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
@@ -546,22 +545,19 @@ prog_parm_usb:
|
||||
K_USBPID TKN_EQUAL usb_pid_list |
|
||||
K_USBSN TKN_EQUAL TKN_STRING {
|
||||
{
|
||||
strncpy(current_prog->usbsn, $3->value.string, PGM_USBSTRINGLEN);
|
||||
current_prog->usbsn[PGM_USBSTRINGLEN-1] = 0;
|
||||
current_prog->usbsn = cache_string($3->value.string);
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
K_USBVENDOR TKN_EQUAL TKN_STRING {
|
||||
{
|
||||
strncpy(current_prog->usbvendor, $3->value.string, PGM_USBSTRINGLEN);
|
||||
current_prog->usbvendor[PGM_USBSTRINGLEN-1] = 0;
|
||||
current_prog->usbvendor = cache_string($3->value.string);
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
K_USBPRODUCT TKN_EQUAL TKN_STRING {
|
||||
{
|
||||
strncpy(current_prog->usbproduct, $3->value.string, PGM_USBSTRINGLEN);
|
||||
current_prog->usbproduct[PGM_USBSTRINGLEN-1] = 0;
|
||||
current_prog->usbproduct = cache_string($3->value.string);
|
||||
free_token($3);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user