- key = &msg->envbuf[bufpos];
- keylen = strlen(key);
- msg->envp[i] = key;
- bufpos += keylen + 1;
- dbg("add '%s' to msg.envp[%i]\n", msg->envp[i], i);
-
- /* remember some keys for further processing */
- if (strncmp(key, "ACTION=", 7) == 0)
- msg->action = &key[7];
- else if (strncmp(key, "DEVPATH=", 8) == 0)
- msg->devpath = &key[8];
- else if (strncmp(key, "SUBSYSTEM=", 10) == 0)
- msg->subsystem = &key[10];
- else if (strncmp(key, "DRIVER=", 7) == 0)
- msg->driver = &key[7];
- else if (strncmp(key, "SEQNUM=", 7) == 0)
- msg->seqnum = strtoull(&key[7], NULL, 10);
- else if (strncmp(key, "DEVPATH_OLD=", 12) == 0)
- msg->devpath_old = &key[12];
- else if (strncmp(key, "PHYSDEVPATH=", 12) == 0)
- msg->physdevpath = &key[12];
- else if (strncmp(key, "PHYSDEVDRIVER=", 14) == 0)
- physdevdriver_key = key;
- else if (strncmp(key, "MAJOR=", 6) == 0)
- maj = strtoull(&key[6], NULL, 10);
- else if (strncmp(key, "MINOR=", 6) == 0)
- min = strtoull(&key[6], NULL, 10);
- else if (strncmp(key, "TIMEOUT=", 8) == 0)
- msg->timeout = strtoull(&key[8], NULL, 10);
- }
- msg->devt = makedev(maj, min);
- msg->envp[i++] = "UDEVD_EVENT=1";