My FUDforum

Home »  » DeviceMaster » nslink fails when autoassigned a large major>=256
nslink fails when autoassigned a large major>=256 [message #1000] Mon, 18 June 2018 18:11 Go to next message
severach is currently offline  severach
Messages: 14
Registered: December 2016
Location: Michigan
nslink works when autoassigned a major < 255, typically 235-245. When low majors are all used up nslink is assigned a large major near 511. nslink mknod a non functional node with major&255. I've traced it down to an invalid MKDEV macro. Enclosed is a patch to change to the system MKDEV macro. Both current and legacy versions need to be fixed.

It would be nice for rmmod nslink to rm all /dev/ttySI*

-- nslinkd.c.orig<>2018-01-05 11:01:23.000000000 -0500
+++ nslinkd.c>2018-06-18 18:06:27.399852118 -0400
@@ -40,10 +40,11 @@
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netpacket/packet.h>
#include <net/if.h>
#include <netdb.h>
+#include <linux/kdev_t.h>
#include "nslink.h"
#include "nslinkd.h"
#include "version.h"
@@ -216,11 +217,10 @@ static void put_pid_file(Wink
* Create a device if it doesn't exist and have the correct device
* number or major/minor number.
-#define MKDEV(a,b) ((int)((((a) & 0xff) << Cool | ((b) & 0xff)WinkWink
static void create_device(const char *prefix, int major, int num, gid_t def_group)
char name[80];
Re: nslink fails when autoassigned a large major>=256 [message #1001 is a reply to message #1000] Tue, 19 June 2018 09:19 Go to previous message
Kurt is currently offline  Kurt
Messages: 227
Registered: July 2016
Location: Minnesota
Power User
Hi Severach,

We appreciate your input.

We'll try and get MKDEV macro changes you suggested into our next version release.

Regarding the rmmod nslink to rm all /dev/tty/SI*... It is an existing issue that we already have an existing bug report for.
We've been waiting on the kernel maintainers for additional info to get this particular issue resolved.


Kurt Rees

Comtrol Corporation
100 Fifth Ave NW
Minneapolis, MN. 55112
Direct +1 763.957.6000 | +1 Fax (763) 957-6001
connect. communicate. control
Previous Topic: ttySIxx update & conflict
Next Topic: Devicemaster nslink loses characters held by RTS/CTS flow control
Goto Forum:

Current Time: Sat Mar 28 18:28:52 CDT 2020

Total time taken to generate the page: 0.01206 seconds