mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
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);
|
fd = open(temp, O_RDONLY);
|
||||||
len = read(fd, temp, PATH_MAX-1);
|
len = read(fd, temp, PATH_MAX-1);
|
||||||
if (len<1) goto end;
|
if (len<1) goto end;
|
||||||
temp[len] = 0;
|
temp[--len] = 0; // remove trailing \n
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
/* Determine device name, type, major and minor */
|
/* Determine device name, type, major and minor */
|
||||||
|
Loading…
Reference in New Issue
Block a user