search for: os_type_openbsd

Displaying 20 results from an estimated 41 matches for "os_type_openbsd".

2014 Nov 28
2
Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...t; + 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 part of the if, like: is_bsd = fs->ty...
2014 Sep 22
1
[PATCH] inspect: basic Minix support
...1 + src/inspect.c | 1 + 6 files changed, 73 insertions(+) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 69ea2dc..fd0c4a1 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -513,6 +513,7 @@ enum inspect_os_type { OS_TYPE_HURD, OS_TYPE_DOS, OS_TYPE_OPENBSD, + OS_TYPE_MINIX, }; enum inspect_os_distro { @@ -758,6 +759,7 @@ extern int guestfs___check_linux_root (guestfs_h *g, struct inspect_fs *fs); extern int guestfs___check_freebsd_root (guestfs_h *g, struct inspect_fs *fs); extern int guestfs___check_netbsd_root (guestfs_h *g, struct inspect_f...
2014 Dec 03
1
[PATCH 1/4] inspect_os: Add support for detecting OpenBSD
...char *major = NULL, *minor = NULL; + + /* The first line of this file gets automatically updated at boot. */ + if (parse_release_file (g, fs, "/etc/motd") == -1) + return -1; + + if (match2 (g, fs->product_name, re_openbsd, &major, &minor)) { + fs->type = OS_TYPE_OPENBSD; + fs->distro = OS_DISTRO_OPENBSD; + + /* Before the first boot, the first line will look like this: + * + * OpenBSD ?.? (UNKNOWN) + */ + if ((fs->product_name[8] != '?') && (fs->product_name[10] != '?')) { + fs->major_vers...
2014 Nov 27
2
[PATCH 1/1] inspect: Fix a bug in the *BSD root detection
..._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 root flag from the bsd_primary */ + bsd_primary-...
2014 Dec 02
0
[PATCH 2/5] inspect_os: Add support for detecting OpenBSD
...char *major = NULL, *minor = NULL; + + /* The first line of this file gets automatically updated at boot. */ + if (parse_release_file (g, fs, "/etc/motd") == -1) + return -1; + + if (match2 (g, fs->product_name, re_openbsd, &major, &minor)) { + fs->type = OS_TYPE_OPENBSD; + fs->distro = OS_DISTRO_OPENBSD; + + /* Before the first boot, the first line will look like this: + * + * OpenBSD ?.? (UNKNOWN) + */ + if ((fs->product_name[8] != '?') && (fs->product_name[10] != '?')) { + fs->major_vers...
2014 Nov 28
0
Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...ses; ++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 part of t...
2014 Nov 28
1
Re: [synnefo-devel] Re: [PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...gt; + 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...
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.
...ng 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_FRUGALWARE + | DISTRO_GENT...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...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 expr[512]; + snprintf (expr, sizeof expr, "/fi...
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
...'d' the hard disk itself. + * Not mapped under Linux. + */ + part_i -= 2; + + if (disk_i != -1 && part_i >= 0 && part_i < 24) + device = safe_asprintf (g, "/dev/sd%c%d", disk_i + 'a', part_i + 5); + } + else if ((os_type == OS_TYPE_OPENBSD) && + match3 (g, spec, re_openbsd_dev, &type, &disk, &part)) { int disk_i = guestfs___parse_unsigned_int (g, disk); int part_i = part[0] - 'a'; /* counting from 0 */ free (type); -- 2.1.3
2014 Dec 02
0
[PATCH 3/5] Support fstab block device resolution for NetBSD
...'d' the hard disk itself. + * Not mapped under Linux. + */ + part_i -= 2; + + if (disk_i != -1 && part_i >= 0 && part_i < 24) + device = safe_asprintf (g, "/dev/sd%c%d", disk_i + 'a', part_i + 5); + } + else if ((os_type == OS_TYPE_OPENBSD) && + match3 (g, spec, re_openbsd_dev, &type, &disk, &part)) { int disk_i = guestfs___parse_unsigned_int (g, disk); int part_i = part[0] - 'a'; /* counting from 0 */ free (type); -- 2.1.3
2017 Aug 08
1
Re: [PATCH v11 08/10] daemon: Implement inspection of Linux and other Unix-like operating systems.
...> +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
2017 Mar 07
0
[PATCH v4 2/9] lib: extract osinfo DB traversing API
...+ 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); + } + + return 0; +} + +static int +parse_distro (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo) +{ + CLEANUP_FREE char *content = NULL; + + osinfo->distro = OS_DISTRO_UNKNOWN; + +...
2017 Feb 10
0
[PATCH v3 05/10] lib: extract osinfo DB traversing API
...+ 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); + } + + return 0; +} + +static int +parse_distro (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo) +{ + CLEANUP_FREE char *content = NULL; + + osinfo->distro = OS_DISTRO_UNKNOWN; + +...
2017 Jun 19
0
[PATCH v7 2/9] lib: extract osinfo DB traversing API
...+ 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); + } + + return 0; +} + +static int +parse_distro (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo) +{ + CLEANUP_FREE char *content = NULL; + + osinfo->distro = OS_DISTRO_UNKNOWN; + +...
2017 Apr 12
0
[PATCH v6 02/10] lib: extract osinfo DB traversing API
...+ 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); + } + + return 0; +} + +static int +parse_distro (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo) +{ + CLEANUP_FREE char *content = NULL; + + osinfo->distro = OS_DISTRO_UNKNOWN; + +...
2017 Jun 12
1
[PATCH] UNFINISHED daemon: Reimplement most inspection APIs in the daemon.
This is the (incomplete) patch which reimplements inspection APIs in the daemon. All ‘XXX’s in this patch indicate areas which are not yet implemented or need further work. Rich.