Displaying 20 results from an estimated 38 matches for "os_type_windows".
2014 Sep 22
1
[PATCH] inspect: basic Minix support
...fs->hostname = guestfs___first_line_of_file (g, "/etc/hostname.file");
+ if (fs->hostname == NULL)
+ return -1;
+ if (STREQ (fs->hostname, "")) {
+ free (fs->hostname);
+ fs->hostname = NULL;
+ }
+ }
+ break;
+
case OS_TYPE_WINDOWS: /* not here, see check_windows_system_registry */
case OS_TYPE_DOS:
case OS_TYPE_OPENBSD:
diff --git a/src/inspect-fs.c b/src/inspect-fs.c
index 21d2a23..539d814 100644
--- a/src/inspect-fs.c
+++ b/src/inspect-fs.c
@@ -247,6 +247,17 @@ check_filesystem (guestfs_h *g, const char *mountable,...
2017 Nov 21
2
[PATCH REPOST 1/2] common/mlstdutils: Add return statement.
No change, just reposting without the "for discussion" tag.
I think we should allow this as it seems like a nice coding style for
a limited subset of imperative-style code.
Rich.
2017 Nov 05
2
[PATCH 0/2] (mainly for discussion) Add ‘return’ statement.
When rewriting the heavily imperative original inspection code, I
longed for a ‘return’ statement so I could keep the new code as close
as possible to the original. OCaml of course does not have such a
statement, but it's relatively simply to implement it in the language.
The first patch does so, and the second patch rewrites a sample of the
inspection code to use it.
Rich.
2017 Aug 09
0
[PATCH v12 08/11] daemon: Implement inspection types and utility functions.
...windows_system_hive : string option;
+ mutable windows_current_control_set : string option;
+ mutable drive_mappings : drive_mapping list;
+}
+and os_type =
+ | OS_TYPE_DOS
+ | OS_TYPE_FREEBSD
+ | OS_TYPE_HURD
+ | OS_TYPE_LINUX
+ | OS_TYPE_MINIX
+ | OS_TYPE_NETBSD
+ | OS_TYPE_OPENBSD
+ | OS_TYPE_WINDOWS
+and distro =
+ | DISTRO_ALPINE_LINUX
+ | DISTRO_ALTLINUX
+ | DISTRO_ARCHLINUX
+ | DISTRO_BUILDROOT
+ | DISTRO_CENTOS
+ | DISTRO_CIRROS
+ | DISTRO_COREOS
+ | DISTRO_DEBIAN
+ | DISTRO_FEDORA
+ | DISTRO_FREEBSD
+ | DISTRO_FREEDOS
+ | DISTRO_FRUGALWARE
+ | DISTRO_GENTOO
+ | DISTRO_LINUX_...
2011 Oct 13
9
[PATCH 1/9] Partially fix --disable-erlang
From: Michael Scherer <misc at zarb.org>
Without this, configure will always enable erlang, no matter what
argument are passed. Now, we can disable it, even if configure still
need the erlang compiler for some obscure reason.
---
configure.ac | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 337a3ed..e0bed2f 100644
---
2014 Dec 02
0
[PATCH 2/5] inspect_os: Add support for detecting OpenBSD
...LL;
+ }
+ }
+ break;
+
case OS_TYPE_MINIX:
if (guestfs_is_file (g, "/etc/hostname.file")) {
fs->hostname = guestfs___first_line_of_file (g, "/etc/hostname.file");
@@ -835,7 +899,6 @@ check_hostname_unix (guestfs_h *g, struct inspect_fs *fs)
case OS_TYPE_WINDOWS: /* not here, see check_windows_system_registry */
case OS_TYPE_DOS:
- case OS_TYPE_OPENBSD:
case OS_TYPE_UNKNOWN:
/* nothing */;
}
@@ -969,18 +1032,36 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs)
STREQ (mp, "/sys"))
continue;
- /* Resolve UUID=...
2014 Dec 03
1
[PATCH 1/4] inspect_os: Add support for detecting OpenBSD
...LL;
+ }
+ }
+ break;
+
case OS_TYPE_MINIX:
if (guestfs_is_file (g, "/etc/hostname.file")) {
fs->hostname = guestfs___first_line_of_file (g, "/etc/hostname.file");
@@ -835,7 +899,6 @@ check_hostname_unix (guestfs_h *g, struct inspect_fs *fs)
case OS_TYPE_WINDOWS: /* not here, see check_windows_system_registry */
case OS_TYPE_DOS:
- case OS_TYPE_OPENBSD:
case OS_TYPE_UNKNOWN:
/* nothing */;
}
@@ -921,6 +984,9 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs)
char **entry;
char augpath[256];
CLEANUP_HASH_FREE Hash_table *md_map = N...
2010 Aug 02
5
[PATCH v3 0/5] Inspection code in C
The first three patches were posted previously:
https://www.redhat.com/archives/libguestfs/2010-July/msg00082.html
The last two patches in this series change guestfish -i to use
this new code.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to
2010 Jul 29
4
[PATCH 0/3] Inspection code in C
These three patches (two were previously posted) can do simple
operating system inspection in C.
Example of use:
><fs> add-ro rhel55.img
><fs> run
><fs> inspect-os
/dev/VolGroup00/LogVol00
><fs> inspect-get-type /dev/VolGroup00/LogVol00
linux
><fs> inspect-get-distro /dev/VolGroup00/LogVol00
rhel
><fs> inspect-get-arch
2010 Aug 17
8
[PATCH v4 0/8] Inspection code in C
Previously discussed here:
https://www.redhat.com/archives/libguestfs/2010-August/msg00002.html
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
2017 Mar 07
0
[PATCH v4 2/9] lib: extract osinfo DB traversing API
...UP_FREE char *content = NULL;
+
+ osinfo->type = OS_TYPE_UNKNOWN;
+
+ content = (char *) xmlNodeGetContent (node);
+ if (content) {
+ if (STREQ (content, "linux"))
+ osinfo->type = OS_TYPE_LINUX;
+ else if (STRPREFIX (content, "win"))
+ osinfo->type = OS_TYPE_WINDOWS;
+ else if (STREQ (content, "freebsd"))
+ osinfo->type = OS_TYPE_FREEBSD;
+ else if (STREQ (content, "netbsd"))
+ osinfo->type = OS_TYPE_NETBSD;
+ else if (STREQ (content, "msdos"))
+ osinfo->type = OS_TYPE_DOS;
+ else if (STREQ (con...
2017 Feb 10
0
[PATCH v3 05/10] lib: extract osinfo DB traversing API
...UP_FREE char *content = NULL;
+
+ osinfo->type = OS_TYPE_UNKNOWN;
+
+ content = (char *) xmlNodeGetContent (node);
+ if (content) {
+ if (STREQ (content, "linux"))
+ osinfo->type = OS_TYPE_LINUX;
+ else if (STRPREFIX (content, "win"))
+ osinfo->type = OS_TYPE_WINDOWS;
+ else if (STREQ (content, "freebsd"))
+ osinfo->type = OS_TYPE_FREEBSD;
+ else if (STREQ (content, "netbsd"))
+ osinfo->type = OS_TYPE_NETBSD;
+ else if (STREQ (content, "msdos"))
+ osinfo->type = OS_TYPE_DOS;
+ else if (STREQ (con...
2017 Jun 19
0
[PATCH v7 2/9] lib: extract osinfo DB traversing API
...UP_FREE char *content = NULL;
+
+ osinfo->type = OS_TYPE_UNKNOWN;
+
+ content = (char *) xmlNodeGetContent (node);
+ if (content) {
+ if (STREQ (content, "linux"))
+ osinfo->type = OS_TYPE_LINUX;
+ else if (STRPREFIX (content, "win"))
+ osinfo->type = OS_TYPE_WINDOWS;
+ else if (STREQ (content, "freebsd"))
+ osinfo->type = OS_TYPE_FREEBSD;
+ else if (STREQ (content, "netbsd"))
+ osinfo->type = OS_TYPE_NETBSD;
+ else if (STREQ (content, "msdos"))
+ osinfo->type = OS_TYPE_DOS;
+ else if (STREQ (con...
2017 Apr 12
0
[PATCH v6 02/10] lib: extract osinfo DB traversing API
...UP_FREE char *content = NULL;
+
+ osinfo->type = OS_TYPE_UNKNOWN;
+
+ content = (char *) xmlNodeGetContent (node);
+ if (content) {
+ if (STREQ (content, "linux"))
+ osinfo->type = OS_TYPE_LINUX;
+ else if (STRPREFIX (content, "win"))
+ osinfo->type = OS_TYPE_WINDOWS;
+ else if (STREQ (content, "freebsd"))
+ osinfo->type = OS_TYPE_FREEBSD;
+ else if (STREQ (content, "netbsd"))
+ osinfo->type = OS_TYPE_NETBSD;
+ else if (STREQ (content, "msdos"))
+ osinfo->type = OS_TYPE_DOS;
+ else if (STREQ (con...
2013 Jun 05
3
[PATCH 1/3] inspection: Refactor windows systemroot detection to allow re-use
...not found */
+ return NULL; /* not found */
}
int
-guestfs___check_windows_root (guestfs_h *g, struct inspect_fs *fs)
+guestfs___check_windows_root (guestfs_h *g, struct inspect_fs *fs,
+ char *const systemroot)
{
- int i;
- char *systemroot;
-
fs->type = OS_TYPE_WINDOWS;
fs->distro = OS_DISTRO_WINDOWS;
- i = guestfs___has_windows_systemroot (g);
- if (i == -1) {
- error (g, "check_windows_root: has_windows_systemroot unexpectedly returned -1");
- return -1;
- }
-
- systemroot = guestfs_case_sensitive_path (g, systemroots[i]);
- if (!sy...
2017 Feb 07
0
[PATCH v2 3/7] mllib: expose libosinfo DB reading functions in mllib
...UP_FREE char *content = NULL;
+
+ osinfo->type = OS_TYPE_UNKNOWN;
+
+ content = (char *) xmlNodeGetContent (node);
+ if (content) {
+ if (STREQ (content, "linux"))
+ osinfo->type = OS_TYPE_LINUX;
+ else if (STRPREFIX (content, "win"))
+ osinfo->type = OS_TYPE_WINDOWS;
+ else if (STREQ (content, "freebsd"))
+ osinfo->type = OS_TYPE_FREEBSD;
+ else if (STREQ (content, "netbsd"))
+ osinfo->type = OS_TYPE_NETBSD;
+ else if (STREQ (content, "msdos"))
+ osinfo->type = OS_TYPE_DOS;
+ else if (STREQ (con...
2017 Jan 12
3
[PATCH 0/3] library: improve handling of external tools
Hi,
the libguestfs library uses a number of external tools; for some of
them, we search for them at build time, enabling some feature only if
found, and later on assuming at runtime they are installed. However,
the situation is more complex than that:
- hardcoding the full path means that there is an incoherency in the
way some of the tools are used, as some other tools (e.g. qemu-img)
are
2017 Jul 31
0
[PATCH v11 09/10] daemon: Implement inspection of Windows.
...sk(\\([0-9]+\\))partition(\\([0-9]+\\))\\([^=]+\\)="
+
+let rec check_windows_root data =
+ let systemroot =
+ match get_windows_systemroot () with
+ | None -> assert false (* Should never happen - see caller. *)
+ | Some systemroot -> systemroot in
+
+ data.os_type <- Some OS_TYPE_WINDOWS;
+ data.distro <- Some DISTRO_WINDOWS;
+ data.windows_systemroot <- Some systemroot;
+ data.arch <- Some (check_windows_arch systemroot);
+
+ (* Load further fields from the Windows registry. *)
+ check_windows_registry systemroot data
+
+and is_windows_systemroot () =
+ get_windows_...
2017 Feb 02
4
[PATCH v2 0/3] library: improve handling of external tools
Hi,
the libguestfs library uses a number of external tools; for some of
them, we search for them at build time, enabling some feature only if
found, and later on assuming at runtime they are installed. However,
the situation is more complex than that:
- hardcoding the full path means that there is an incoherency in the
way some of the tools are used, as some other tools (e.g. qemu-img)
are
2017 Aug 09
16
[PATCH v12 00/11] Reimplement inspection in the daemon.
This fixes almost everything. Note that it adds an extra commit which
fixes the whole utf8/iconv business.
It's probably better to list what isn't fixed:
(1) I didn't leave the osinfo code around because I'm still haven't
looked too closely at virt-builder-repository. Can't we just fetch
this code from the git history when we need it?
(2) I didn't change the way