Lines 3054-3061
parse_action(const char *p, struct filed *f)
Link Here
|
3054 |
(void)strlcpy(f->fu_fname, p + sizeof(_PATH_DEV) - 1, |
3054 |
(void)strlcpy(f->fu_fname, p + sizeof(_PATH_DEV) - 1, |
3055 |
sizeof(f->fu_fname)); |
3055 |
sizeof(f->fu_fname)); |
3056 |
/* This will be reopened by ttymsg(). */ |
3056 |
/* This will be reopened by ttymsg(). */ |
3057 |
close(f->f_file); |
3057 |
//close(f->f_file); // Do not close the file in case it is a VTY. It would otherwise make the VTY inaccessible and useless to the user. |
3058 |
f->f_file = -1; |
3058 |
//f->f_file = -1; // Do not lose the file descriptor. See the above line. |
3059 |
} else { |
3059 |
} else { |
3060 |
(void)strlcpy(f->fu_fname, p, sizeof(f->fu_fname)); |
3060 |
(void)strlcpy(f->fu_fname, p, sizeof(f->fu_fname)); |
3061 |
f->f_type = F_FILE; |
3061 |
f->f_type = F_FILE; |