summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-05-27 09:17:21 +0200
committerIngo Molnar <mingo@kernel.org>2015-05-27 09:17:21 +0200
commit8d12ded3dd499e38e8022fe3ec53920d085e57a3 (patch)
tree8b73e5a68f24b0bd33430bed8993de979825ffcf /init
parentd499c106843afa0703a68c64662bf42a16421aec (diff)
parent68ab747604da98f0a0414f197f346ac22888fcee (diff)
downloadlinux-8d12ded3dd499e38e8022fe3ec53920d085e57a3.tar.bz2
Merge branch 'perf/urgent' into perf/core, before applying dependent patches
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'init')
-rw-r--r--init/do_mounts.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 8369ffa5f33d..a95bbdb2a502 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -225,10 +225,11 @@ dev_t name_to_dev_t(const char *name)
#endif
if (strncmp(name, "/dev/", 5) != 0) {
- unsigned maj, min;
+ unsigned maj, min, offset;
char dummy;
- if (sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) {
+ if ((sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) ||
+ (sscanf(name, "%u:%u:%u:%c", &maj, &min, &offset, &dummy) == 3)) {
res = MKDEV(maj, min);
if (maj != MAJOR(res) || min != MINOR(res))
goto fail;