mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-21 16:46:30 +03:00
Suggest udevadm control --reload instead of rebooting
For Linux udev, the new rules files could be read at runtime by reloading them, rather than requiring a reboot. My experience says this is always needed, not just for HID devices, and it's always required to replug them afterwards.
This commit is contained in:
@@ -1638,11 +1638,6 @@ void dev_output_pgm_defs(char *pgmidcp) {
|
||||
dev_pgm_raw(pgm);
|
||||
}
|
||||
|
||||
int reboot = 0;
|
||||
|
||||
for(Dev_udev *u = udr; !reboot && u - udr < ui; u++)
|
||||
reboot |= u->ishid;
|
||||
|
||||
if(udev && ui) {
|
||||
int all = str_eq(pgmidcp, "*");
|
||||
const char *var = all? "": str_asciiname((char *) str_ccprintf("-%s", pgmidcp));
|
||||
@@ -1651,8 +1646,9 @@ void dev_output_pgm_defs(char *pgmidcp) {
|
||||
dev_info("%s -c \"%s/u\" | tail -n +%d | sudo tee /etc/udev/rules.d/55-%s%s.rules\n",
|
||||
progname, pgmidcp, all? 9: 11, progname, var);
|
||||
dev_info("sudo chmod 0644 /etc/udev/rules.d/55-%s%s.rules\n\n", progname, var);
|
||||
dev_info("2. %s\n", reboot? "Reboot your computer": "Unplug any AVRDUDE USB programmers and plug them in again");
|
||||
dev_info("3. Enjoy user access to the USB programmer(s)\n\n");
|
||||
dev_info("2. sudo udevadm control --reload");
|
||||
dev_info("3. Unplug any AVRDUDE USB programmers and plug them in again");
|
||||
dev_info("4. Enjoy user access to the USB programmer(s)\n\n");
|
||||
if(!all)
|
||||
dev_info("Note: To install all udev rules known to AVRDUDE follow: %s -c \"*/u\" | more\n\n", progname);
|
||||
dev_info("# Generated from avrdude -c \"%s/u\"\n", pgmidcp);
|
||||
|
||||
Reference in New Issue
Block a user