Skip to content

Commit

Permalink
Merge pull request lxc#4422 from mihalicyn/ct_list_fix
Browse files Browse the repository at this point in the history
lxc-ls: list names with whitespaces in `--active`.
  • Loading branch information
stgraber authored Apr 2, 2024
2 parents a85d91b + f71b8e3 commit 5376385
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lxc/lxccontainer.c
Original file line number Diff line number Diff line change
Expand Up @@ -5478,14 +5478,12 @@ int list_active_containers(const char *lxcpath, char ***nret,
return -1;

while (getline(&line, &len, f) != -1) {
char *p = strrchr(line, ' '), *p2;
if (!p)
continue;
p++;
char *p, *p2;

if (*p != 0x40)
p = strstr(line, " @");
if (!p)
continue;
p++;
p += 2;

is_hashed = false;

Expand Down

0 comments on commit 5376385

Please sign in to comment.