search for: os_type_netbsd

Displaying 20 results from an estimated 46 matches for "os_type_netbsd".

2014 Nov 28
2
Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...nspect_fs *fs, *bsd_primary = NULL; > + > + for (i = 0; i < g->nr_fses; ++i) { > + fs = &g->fses[i]; > + > + is_primary = match (g, fs->mountable, re_primary_partition); > + is_bsd = > + fs->type == OS_TYPE_FREEBSD || > + fs->type == OS_TYPE_NETBSD || > + fs->type == OS_TYPE_OPENBSD; > + > + if (fs->is_root && is_primary && is_bsd) { > + bsd_primary = fs; > + continue; > + } This will run the regexp matching for every filesystem found; what about inlining the match call as last par...
2014 Sep 22
1
[PATCH] inspect: basic Minix support
...diff --git a/src/inspect-apps.c b/src/inspect-apps.c index c199238..a77e9ce 100644 --- a/src/inspect-apps.c +++ b/src/inspect-apps.c @@ -157,6 +157,7 @@ guestfs__inspect_list_applications2 (guestfs_h *g, const char *root) break; case OS_TYPE_FREEBSD: + case OS_TYPE_MINIX: case OS_TYPE_NETBSD: case OS_TYPE_DOS: case OS_TYPE_OPENBSD: diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 89236ab..3f57cd5 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -77,6 +77,7 @@ static pcre *re_nld; static pcre *re_opensuse_version; static pcre *re_sles_version...
2014 Nov 27
2
[PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...l is_primary, is_bsd; + struct inspect_fs *fs, *bsd_primary = NULL; + + for (i = 0; i < g->nr_fses; ++i) { + fs = &g->fses[i]; + + is_primary = match (g, fs->mountable, re_primary_partition); + is_bsd = ((fs->type == OS_TYPE_FREEBSD) || \ + (fs->type == OS_TYPE_NETBSD) || \ + (fs->type == OS_TYPE_OPENBSD)); + + if (fs->is_root && is_primary && is_bsd) { + bsd_primary = fs; + continue; + } + + if (fs->is_root && bsd_primary && (bsd_primary->type == fs->type)) { + /* remove the is...
2014 Nov 28
0
Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...> + > > + for (i = 0; i < g->nr_fses; ++i) { > > + fs = &g->fses[i]; > > + > > + is_primary = match (g, fs->mountable, re_primary_partition); > > + is_bsd = > > + fs->type == OS_TYPE_FREEBSD || > > + fs->type == OS_TYPE_NETBSD || > > + fs->type == OS_TYPE_OPENBSD; > > + > > + if (fs->is_root && is_primary && is_bsd) { > > + bsd_primary = fs; > > + continue; > > + } > > This will run the regexp matching for every filesystem found; what &...
2014 Nov 28
1
Re: [synnefo-devel] Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...+ for (i = 0; i < g->nr_fses; ++i) { >>> + fs = &g->fses[i]; >>> + >>> + is_primary = match (g, fs->mountable, re_primary_partition); >>> + is_bsd = >>> + fs->type == OS_TYPE_FREEBSD || >>> + fs->type == OS_TYPE_NETBSD || >>> + fs->type == OS_TYPE_OPENBSD; >>> + >>> + if (fs->is_root && is_primary && is_bsd) { >>> + bsd_primary = fs; >>> + continue; >>> + } >> This will run the regexp matching for every filesyst...
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 ---
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.
...software_hive : string option; + mutable 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_FRUGAL...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...heck_systemd_mnt (guestfs_h *g, struct inspect_fs *fs, const char *fname) +{ + CLEANUP_FREE_STRING_LIST char **entries = NULL; + char **entry; + char augpath[256]; + CLEANUP_HASH_FREE Hash_table *md_map = NULL; + bool is_bsd = (fs->type == OS_TYPE_FREEBSD || + fs->type == OS_TYPE_NETBSD || + fs->type == OS_TYPE_OPENBSD); + + /* Generate a map of MD device paths listed in /etc/mdadm.conf to MD device + * paths in the guestfs appliance */ + if (map_md_devices (g, &md_map) == -1) { + printf ("map_md_dev fail\n"); + return -1; + } + + char...
2015 Mar 16
2
[PATCH] RFE: Inspection should support systemd mount units
Adds support for systemd .mount files, uses Augeas to extract mount points. Fixes RHBZ#1113153. Maros Zatko (1): inspection: add support for systemd .mount files src/inspect-fs-unix.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) -- 1.9.3
2014 Dec 03
0
[PATCH 2/4] Support fstab block device resolution for NetBSD
...,7 +1630,25 @@ resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map) device = safe_asprintf (g, "/dev/sd%c%d", disk_i + 'a', part_i + 5); } } - else if (match3 (g, spec, re_openbsd_dev, &type, &disk, &part)) { + else if ((os_type == OS_TYPE_NETBSD) && + match3 (g, spec, re_netbsd_dev, &type, &disk, &part)) { + int disk_i = guestfs___parse_unsigned_int (g, disk); + int part_i = part[0] - 'a'; /* counting from 0 */ + free (type); + free (disk); + free (part); + + if (part_i > 3) +...
2014 Dec 02
0
[PATCH 3/5] Support fstab block device resolution for NetBSD
...,7 +1626,25 @@ resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map) device = safe_asprintf (g, "/dev/sd%c%d", disk_i + 'a', part_i + 5); } } - else if (match3 (g, spec, re_openbsd_dev, &type, &disk, &part)) { + else if ((os_type == OS_TYPE_NETBSD) && + match3 (g, spec, re_netbsd_dev, &type, &disk, &part)) { + int disk_i = guestfs___parse_unsigned_int (g, disk); + int part_i = part[0] - 'a'; /* counting from 0 */ + free (type); + free (disk); + free (part); + + if (part_i > 3) +...
2014 Dec 03
0
[PATCH 4/4] Add freebsd and netbsd distros
...itative version file. The version number is * in /etc/motd, which the system administrator might edit, but @@ -634,6 +635,7 @@ guestfs___check_netbsd_root (guestfs_h *g, struct inspect_fs *fs) if (match2 (g, fs->product_name, re_netbsd, &major, &minor)) { fs->type = OS_TYPE_NETBSD; + fs->distro = OS_DISTRO_NETBSD; fs->major_version = guestfs___parse_unsigned_int (g, major); free (major); if (fs->major_version == -1) { diff --git a/src/inspect-fs.c b/src/inspect-fs.c index aaddb49..e9cc2e9 100644 --- a/src/inspect-fs.c +++ b/src/inspect-fs.c...
2014 Dec 02
0
[PATCH 5/5] Add freebsd and netbsd distros
...itative version file. The version number is * in /etc/motd, which the system administrator might edit, but @@ -634,6 +635,7 @@ guestfs___check_netbsd_root (guestfs_h *g, struct inspect_fs *fs) if (match2 (g, fs->product_name, re_netbsd, &major, &minor)) { fs->type = OS_TYPE_NETBSD; + fs->distro = OS_DISTRO_NETBSD; fs->major_version = guestfs___parse_unsigned_int (g, major); free (major); if (fs->major_version == -1) { diff --git a/src/inspect-fs.c b/src/inspect-fs.c index aaddb49..e9cc2e9 100644 --- a/src/inspect-fs.c +++ b/src/inspect-fs.c...
2017 Aug 08
1
Re: [PATCH v11 08/10] daemon: Implement inspection of Linux and other Unix-like operating systems.
...e it's already implemented here... > +and check_fstab_entry md_map root_mountable os_type aug entry = > + if verbose () then > + eprintf "check_fstab_entry: augeas path: %s\n%!" entry; > + > + let is_bsd = > + os_type = OS_TYPE_FREEBSD || > + os_type = OS_TYPE_NETBSD || > + os_type = OS_TYPE_OPENBSD in 'match' here? -- Pino Toscano
2014 Dec 03
1
[PATCH 1/4] inspect_os: Add support for detecting OpenBSD
...PENBSD: 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 = NULL; + bool is_bsd = (fs->type == OS_TYPE_FREEBSD || + fs->type == OS_TYPE_NETBSD || + fs->type == OS_TYPE_OPENBSD); /* Generate a map of MD device paths listed in /etc/mdadm.conf to MD device * paths in the guestfs appliance */ @@ -975,12 +1041,31 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs) else if (STRPREFIX (spec, "LABEL="))...
2017 Mar 07
0
[PATCH v4 2/9] lib: extract osinfo DB traversing API
...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 (content, "openbsd")) + osinfo->type = OS_TYPE_OPENBSD; + else + debug (g, "osinfo: warning: unknown <family> '%s'", content); + } + + ret...
2017 Feb 10
0
[PATCH v3 05/10] lib: extract osinfo DB traversing API
...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 (content, "openbsd")) + osinfo->type = OS_TYPE_OPENBSD; + else + debug (g, "osinfo: warning: unknown <family> '%s'", content); + } + + ret...
2017 Jun 19
0
[PATCH v7 2/9] lib: extract osinfo DB traversing API
...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 (content, "openbsd")) + osinfo->type = OS_TYPE_OPENBSD; + else + debug (g, "osinfo: warning: unknown <family> '%s'", content); + } + + ret...