]> 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, 13 Sep 2012 00:58:24 +0000 (10:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Sep 2012 05:29:55 +0000 (15:29 +1000)
commit68c42ce3632b3adea339afa3a7a0878f6a81b7b8
tree5146c0ad16bd6882c9088e5d4b7f863d98b56696
parentb486a5276a2abae6277ad6cc4eb6bc4308ca0fb4
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