Permalink
Browse files

Revert "init: add support for PARTUUID="

PARTUUID isn't the same as UUID, as it's the GPT identifier for the
partition rather than the identifier for the filesystem. Therefore, it's
unfair to declare these two as synonymous. But, since libblkid can't
resolve a PARTUUID back to a device, we remove this support for the time
being.

This reverts commit e02ceaa.
  • Loading branch information...
1 parent f6c3da3 commit 72272da8a855d9551c04de9ba502f3befb2a91d5 @falconindy committed Jun 7, 2011
Showing with 6 additions and 9 deletions.
  1. +0 −1 README.pod
  2. +6 −8 init.c
View
@@ -129,7 +129,6 @@ a number of different formats, such as:
root=/dev/sda2
root=LABEL=root
root=UUID=037b9d94-148e-4ee4-8d38-67bfe15bb535
- root=PARTUUID=037b9d94-148e-4ee4-8d38-67bfe15bb535
root=MAJOR:MINOR
This parameter, for obvious reasons, must be specified.
View
14 init.c
@@ -699,21 +699,19 @@ static int wait_for_root(void) { /* {{{ */
static void try_create_root(void) { /* {{{ */
dev_t rootdev;
- char *root, *tag = NULL;
+ char *root;
root = getenv("root");
if (strncmp(root, "UUID=", 5) == 0 ||
strncmp(root, "LABEL=", 6) == 0) {
- tag = root;
- } else if (strncmp(root, "PARTUUID=", 9) == 0) {
- tag = &root[4];
- }
+ /* resolve UUID= or LABEL= syntax */
+ char *key, *val, *res;
- if (tag) {
- char *res;
+ key = val = root;
+ strsep(&val, "=");
- res = blkid_evaluate_tag(tag, NULL, NULL);
+ res = blkid_evaluate_tag(key, val, NULL);
if (!res) {
err("failed to resolve %s to a root device", root);
return;

0 comments on commit 72272da

Please sign in to comment.