From: Rob Landley Date: Thu, 12 Jan 2006 03:07:49 +0000 (-0000) Subject: The major:minor read from dev ends with \n, need to trim that. X-Git-Tag: 1_1_0~356 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1c19deed17f21792fcc485038b6173b9b4c186f1;p=oweals%2Fbusybox.git The major:minor read from dev ends with \n, need to trim that. --- diff --git a/util-linux/mdev.c b/util-linux/mdev.c index d414c0c10..10369ded3 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -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 */