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:25:42 +0100 |
commit | cdbb3008ccfd21003df635c3d522051c02f19e15 (patch) | |
tree | f309bb96d3c7b7503949e495b2d159fc88b275bb | |
parent | 7c4c87ba5c75937fff3368fa7deff7598db8ef1b (diff) | |
download | libguestfs-cdbb3008ccfd21003df635c3d522051c02f19e15.tar.gz libguestfs-cdbb3008ccfd21003df635c3d522051c02f19e15.tar.xz libguestfs-cdbb3008ccfd21003df635c3d522051c02f19e15.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 5695adc1..2caf4002 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) |