Displaying 7 results from an estimated 7 matches for "guestfs_impl_inspect_get_osinfo".
2019 Apr 02
6
[PATCH 0/5] Small inspection improvements
Few improvements to the results of the inspection on some distros.
Pino Toscano (5):
inspect: factorize list of rolling distros
inspect: detect Gentoo from os-release
inspect: fully detect Arch Linux from os-release
inspect: return osinfo short IDs for rolling distros
inspect: correct osinfo ID for ALT Linux >= 8
daemon/inspect_fs_unix.ml | 15 +++++++++------
2019 Dec 10
1
[PATCH] inspect: correct osinfo ID for CentOS >= 8
...sented with a simpler "centos8" osinfo ID.
---
lib/inspect-osinfo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c
index 90b7ffd86..ba07e4564 100644
--- a/lib/inspect-osinfo.c
+++ b/lib/inspect-osinfo.c
@@ -40,7 +40,9 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root)
if (STREQ (type, "linux")) {
if (STREQ (distro, "centos")) {
- if (major >= 7)
+ if (major >= 8)
+ return safe_asprintf (g, "%s%d", distro, major);
+ else if (major == 7)
return safe_asprin...
2020 Jan 08
1
[PATCH] inspect: avoid returning "unknownX.Y" for unknown Linux distros
...ort osinfo ID. Just return "unknown" instead.
---
lib/inspect-osinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c
index ba07e4564..d2272dfdd 100644
--- a/lib/inspect-osinfo.c
+++ b/lib/inspect-osinfo.c
@@ -70,7 +70,7 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root)
return safe_asprintf (g, "%s%d.%d", distro, major, minor);
}
- if (major > 0 || minor > 0)
+ if (STRNEQ (distro, "unknown") && (major > 0 || minor > 0))
return safe_asprintf (g, "%s%d.%d",...
2019 Feb 25
1
[PATCH] inspect: return osinfo short IDs for recent Windows versions
...rsions
since Windows XP.
---
lib/inspect-osinfo.c | 60 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c
index 816d317f1..f93f7ac52 100644
--- a/lib/inspect-osinfo.c
+++ b/lib/inspect-osinfo.c
@@ -69,6 +69,66 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root)
if (STREQ (distro, "msdos"))
return safe_strdup (g, "msdos6.22");
}
+ else if (STREQ (type, "windows")) {
+ CLEANUP_FREE char *product_name = NULL;
+ CLEANUP_FREE char *product_variant = NULL;
+
+ product_name =...
2019 Feb 28
1
[PATCH v2] inspect: return osinfo short IDs for recent Windows versions
...the new win2k19 osinfo ID
lib/inspect-osinfo.c | 63 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c
index 816d317f1..e0d19c672 100644
--- a/lib/inspect-osinfo.c
+++ b/lib/inspect-osinfo.c
@@ -69,6 +69,69 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root)
if (STREQ (distro, "msdos"))
return safe_strdup (g, "msdos6.22");
}
+ else if (STREQ (type, "windows")) {
+ CLEANUP_FREE char *product_name = NULL;
+ CLEANUP_FREE char *product_variant = NULL;
+
+ product_name =...
2019 Apr 02
0
[PATCH 5/5] inspect: correct osinfo ID for ALT Linux >= 8
...osinfo-db, so return the proper IDs
for the newest stable series.
---
lib/inspect-osinfo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c
index 51612bad1..90b7ffd86 100644
--- a/lib/inspect-osinfo.c
+++ b/lib/inspect-osinfo.c
@@ -62,6 +62,11 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root)
else if (STREQ (distro, "archlinux") || STREQ (distro, "gentoo")
|| STREQ (distro, "voidlinux"))
return safe_strdup (g, distro);
+ else if (STREQ (distro, "altlinux")) {
+ if (major >= 8)
+...
2018 Feb 21
3
[PATCH] New API: inspect_get_osinfo
...this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <config.h>
+
+#include "guestfs.h"
+#include "guestfs-internal.h"
+#include "guestfs-internal-actions.h"
+
+char *
+guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root)
+{
+ CLEANUP_FREE char *type = NULL;
+ CLEANUP_FREE char *distro = NULL;
+ int major, minor;
+
+ type = guestfs_inspect_get_type (g, root);
+ if (!type)
+ return NULL;
+ distro = guestfs_inspect_get_distro (g, root);
+ if (!distro)
+ return NULL;
+ maj...