]> git.karo-electronics.de Git - karo-tx-linux.git/commit
init: reduce PARTUUID min length to 1 from 36
authorStephen Warren <swarren@nvidia.com>
Thu, 25 Oct 2012 01:14:44 +0000 (12:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 29 Oct 2012 03:17:18 +0000 (14:17 +1100)
commitac58c8b220e8cb0ebe186960f1f70ebfbe44b0de
tree5e4db9b865a1011ce5eb67a9100dc90dbd404147
parent0ec23f6fe2078c4d023879f99ca3243b370936e6
init: reduce PARTUUID min length to 1 from 36

Reduce the minimum length for a root=PARTUUID= parameter to be considered
valid from 36 to 1.  EFI/GPT partition UUIDs are always exactly 36
characters long, hence the previous limit.  However, the next patch will
support DOS/MBR UUIDs too, which have a different, shorter, format.
Instead of validating any particular length, just ensure that at least
some non-empty value was given by the user.

Also, consider a missing UUID value to be a parsing error, in the same
vein as if /PARTNROFF exists and can't be parsed.  As such, make both
error cases print a message and disable rootwait.  Convert to pr_err while
we're at it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>
Cc: Will Drewry <wad@chromium.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
init/do_mounts.c