diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-05-24 15:38:46 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-06-01 19:31:01 +0100 |
commit | ecf4a68da0baab2509c7cb02a24b73a4eb01f7c1 (patch) | |
tree | 38406f6ebb5b54b5bf12f7b768b3d12fa2487b26 | |
parent | dc8250dfdc0dbdfc7405050d1e69c54784cb22bf (diff) | |
download | libguestfs-ecf4a68da0baab2509c7cb02a24b73a4eb01f7c1.tar.gz libguestfs-ecf4a68da0baab2509c7cb02a24b73a4eb01f7c1.tar.xz libguestfs-ecf4a68da0baab2509c7cb02a24b73a4eb01f7c1.zip |
inspection: Use parse_release_file to parse ttylinux release file.
parse_release_file should be used to set fs->product_name, instead of
calling guestfs___first_line_of_file directory, although currently the
two are equivalent.
This is code motion and fixes
commit b648b1813fc8e55db790435b5414d9be3ec765d2.
(cherry picked from commit cffb7fefc88a317f957785f6448fb24183c8c629)
-rw-r--r-- | src/inspect_fs_unix.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/inspect_fs_unix.c b/src/inspect_fs_unix.c index bd01be7a..85928a2b 100644 --- a/src/inspect_fs_unix.c +++ b/src/inspect_fs_unix.c @@ -450,8 +450,7 @@ guestfs___check_linux_root (guestfs_h *g, struct inspect_fs *fs) else if (guestfs_exists (g, "/etc/ttylinux-target") > 0) { fs->distro = OS_DISTRO_TTYLINUX; - fs->product_name = guestfs___first_line_of_file (g, "/etc/ttylinux-target"); - if (fs->product_name == NULL) + if (parse_release_file (g, fs, "/etc/ttylinux-target") == -1) return -1; if (guestfs___parse_major_minor (g, fs) == -1) |