* util/getroot.c (find_root_device_from_libzfs): Use xasprintf.
This commit is contained in:
parent
49e891ac9c
commit
112b483765
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2011-11-28 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* util/getroot.c (find_root_device_from_libzfs): Use xasprintf.
|
||||||
|
|
||||||
2011-11-27 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-11-27 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/fs/zfs/zfs.c (recovery): Fix spelling.
|
* grub-core/fs/zfs/zfs.c (recovery): Fix spelling.
|
||||||
|
|
|
@ -355,7 +355,7 @@ find_root_device_from_libzfs (const char *dir)
|
||||||
char name[PATH_MAX], state[256], readlen[256], writelen[256], cksum[256], notes[256];
|
char name[PATH_MAX], state[256], readlen[256], writelen[256], cksum[256], notes[256];
|
||||||
unsigned int dummy;
|
unsigned int dummy;
|
||||||
|
|
||||||
asprintf (&cmd, "zpool status %s", poolname);
|
cmd = xasprintf ("zpool status %s", poolname);
|
||||||
fp = popen (cmd, "r");
|
fp = popen (cmd, "r");
|
||||||
free (cmd);
|
free (cmd);
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ find_root_device_from_libzfs (const char *dir)
|
||||||
|
|
||||||
free (line);
|
free (line);
|
||||||
}
|
}
|
||||||
asprintf (&device, "/dev/%s", name);
|
device = xasprintf ("/dev/%s", name);
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
pclose (fp);
|
pclose (fp);
|
||||||
|
|
Loading…
Reference in a new issue