summaryrefslogtreecommitdiffstats
path: root/src/inspect_fs_unix.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-05-24 15:38:46 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-05-24 15:38:46 +0100
commitcffb7fefc88a317f957785f6448fb24183c8c629 (patch)
tree00b70d73c4ec738676029cbec7cb6eb78f99e3d9 /src/inspect_fs_unix.c
parentee9ab52bc3e087f63dcc51d3b6ac5c79277425e1 (diff)
downloadlibguestfs-cffb7fefc88a317f957785f6448fb24183c8c629.tar.gz
libguestfs-cffb7fefc88a317f957785f6448fb24183c8c629.tar.xz
libguestfs-cffb7fefc88a317f957785f6448fb24183c8c629.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.
Diffstat (limited to 'src/inspect_fs_unix.c')
-rw-r--r--src/inspect_fs_unix.c3
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)