projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'fbdev-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
[firefly-linux-kernel-4.4.55.git]
/
init
/
do_mounts.c
diff --git
a/init/do_mounts.c
b/init/do_mounts.c
index eb410083e8e075f9ca1829d0db1bf3cb70d17139..8369ffa5f33db24a12703ce74eb7ac437ada96f9 100644
(file)
--- a/
init/do_mounts.c
+++ b/
init/do_mounts.c
@@
-207,7
+207,7
@@
done:
* bangs.
*/
* bangs.
*/
-dev_t name_to_dev_t(char *name)
+dev_t name_to_dev_t(c
onst c
har *name)
{
char s[32];
char *p;
{
char s[32];
char *p;
@@
-226,8
+226,9
@@
dev_t name_to_dev_t(char *name)
if (strncmp(name, "/dev/", 5) != 0) {
unsigned maj, min;
if (strncmp(name, "/dev/", 5) != 0) {
unsigned maj, min;
+ char dummy;
- if (sscanf(name, "%u:%u
", &maj, &min
) == 2) {
+ if (sscanf(name, "%u:%u
%c", &maj, &min, &dummy
) == 2) {
res = MKDEV(maj, min);
if (maj != MAJOR(res) || min != MINOR(res))
goto fail;
res = MKDEV(maj, min);
if (maj != MAJOR(res) || min != MINOR(res))
goto fail;
@@
-286,6
+287,7
@@
fail:
done:
return res;
}
done:
return res;
}
+EXPORT_SYMBOL_GPL(name_to_dev_t);
static int __init root_dev_setup(char *line)
{
static int __init root_dev_setup(char *line)
{