backport files/ symlink overwrite fix from r25078
[openwrt/svn-archive/archive.git] / package / nozomi / patches / 001-devfs.patch
1 --- a/nozomi.c
2 +++ b/nozomi.c
3 @@ -2093,11 +2093,15 @@ static int ntty_tty_init(dc_t *dc) {
4
5 td->magic = TTY_DRIVER_MAGIC;
6 td->driver_name = NOZOMI_NAME_TTY;
7 +#ifndef CONFIG_DEVFS_FS
8 td->name = "noz";
9 +#else
10 + td->name = "noz%d";
11 +#endif
12 td->major = NTTY_TTY_MAJOR,
13 td->type = TTY_DRIVER_TYPE_SERIAL,
14 td->subtype = SERIAL_TYPE_NORMAL,
15 - td->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
16 + td->flags = TTY_DRIVER_REAL_RAW,
17 td->init_termios = tty_std_termios;
18 td->init_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL;
19