The major:minor read from dev ends with \n, need to trim that.

This commit is contained in:
Rob Landley 2006-01-12 03:07:49 +00:00
parent bbf4e167f2
commit 1c19deed17

View File

@ -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 */