The major:minor read from dev ends with \n, need to trim that.
This commit is contained in:
parent
bbf4e167f2
commit
1c19deed17
@ -42,7 +42,7 @@ static void make_device(char *path)
|
||||
fd = open(temp, O_RDONLY);
|
||||
len = read(fd, temp, PATH_MAX-1);
|
||||
if (len<1) goto end;
|
||||
temp[len] = 0;
|
||||
temp[--len] = 0; // remove trailing \n
|
||||
close(fd);
|
||||
|
||||
/* Determine device name, type, major and minor */
|
||||
|
Loading…
Reference in New Issue
Block a user