mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
parent
227bcd91b4
commit
0eba88dc9f
@ -144,11 +144,11 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
|
||||
slash = strchr(optarg, '/');
|
||||
if (slash) {
|
||||
devtype = strdup(devtype + 1);
|
||||
devtype = strdup(slash + 1);
|
||||
if (!devtype)
|
||||
return -ENOMEM;
|
||||
|
||||
subsystem = strndup(optarg, devtype - optarg);
|
||||
subsystem = strndup(optarg, slash - optarg);
|
||||
} else
|
||||
subsystem = strdup(optarg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user