COMPILE (re_fedora, "Fedora release (\\d+)", 0);
COMPILE (re_rhel_old,
- "(?:Red Hat Enterprise Linux|CentOS|Scientific Linux).*release (\\d+).*Update (\\d+)", 0);
+ "(?:Red Hat|CentOS|Scientific Linux).*release (\\d+).*Update (\\d+)", 0);
COMPILE (re_rhel,
- "(?:Red Hat Enterprise Linux|CentOS|Scientific Linux).*release (\\d+)\\.(\\d+)", 0);
+ "(?:Red Hat|CentOS|Scientific Linux).*release (\\d+)\\.(\\d+)", 0);
COMPILE (re_rhel_no_minor,
- "(?:Red Hat Enterprise Linux|CentOS|Scientific Linux).*release (\\d+)", 0);
+ "(?:Red Hat|CentOS|Scientific Linux).*release (\\d+)", 0);
COMPILE (re_major_minor, "(\\d+)\\.(\\d+)", 0);
COMPILE (re_aug_seq, "/\\d+$", 0);
COMPILE (re_xdev, "^/dev/(?:h|s|v|xv)d([a-z]\\d*)$", 0);
int is_swap = vfs_type && STREQ (vfs_type, "swap");
- if (g->verbose)
- fprintf (stderr, "check_for_filesystem_on: %s %d %d (%s)\n",
- device, is_block, is_partnum,
- vfs_type ? vfs_type : "failed to get vfs type");
+ debug (g, "check_for_filesystem_on: %s %d %d (%s)",
+ device, is_block, is_partnum,
+ vfs_type ? vfs_type : "failed to get vfs type");
if (is_swap) {
free (vfs_type);
fs->fstab[n-1].device = device;
fs->fstab[n-1].mountpoint = mountpoint;
- if (g->verbose)
- fprintf (stderr, "fstab: device=%s mountpoint=%s\n", device, mountpoint);
+ debug (g, "fstab: device=%s mountpoint=%s", device, mountpoint);
return 0;
}
return -1;
}
- if (g->verbose)
- fprintf (stderr, "windows %%SYSTEMROOT%% = %s", systemroot);
+ debug (g, "windows %%SYSTEMROOT%% = %s", systemroot);
/* Freed by guestfs___free_inspect_info. */
fs->windows_systemroot = systemroot;
snprintf (cmd, cmd_len, DB_DUMP " -p '%s'", tmpfile);
- if (g->verbose)
- fprintf (stderr, "list_applications_rpm: %s\n", cmd);
+ debug (g, "list_applications_rpm: %s", cmd);
pp = popen (cmd, "r");
if (pp == NULL) {
NOT_IMPL(NULL);
}
+char *
+guestfs__inspect_get_format (guestfs_h *g, const char *root)
+{
+ NOT_IMPL(NULL);
+}
+
+int
+guestfs__inspect_is_live (guestfs_h *g, const char *root)
+{
+ NOT_IMPL(-1);
+}
+
+int
+guestfs__inspect_is_netinst (guestfs_h *g, const char *root)
+{
+ NOT_IMPL(-1);
+}
+
+int
+guestfs__inspect_is_multipart (guestfs_h *g, const char *root)
+{
+ NOT_IMPL(-1);
+}
+
#endif /* no PCRE or hivex at compile time */
void
return 0;
if (r != 1) {
/* Internal error -- should not happen. */
- fprintf (stderr, "libguestfs: %s: %s: internal error: pcre_exec returned unexpected error code %d when matching against the string \"%s\"\n",
+ warning (g, "%s: %s: pcre_exec returned unexpected error code %d when matching against the string \"%s\"\n",
__FILE__, __func__, r, str);
return 0;
}
return NULL;
if (r != 2) {
/* Internal error -- should not happen. */
- fprintf (stderr, "libguestfs: %s: %s: internal error: pcre_exec returned unexpected error code %d when matching against the string \"%s\"\n",
+ warning (g, "%s: %s: internal error: pcre_exec returned unexpected error code %d when matching against the string \"%s\"",
__FILE__, __func__, r, str);
return NULL;
}
return 0;
if (r != 3) {
/* Internal error -- should not happen. */
- fprintf (stderr, "libguestfs: %s: %s: internal error: pcre_exec returned unexpected error code %d when matching against the string \"%s\"\n",
+ warning (g, "%s: %s: internal error: pcre_exec returned unexpected error code %d when matching against the string \"%s\"",
__FILE__, __func__, r, str);
return 0;
}
return 0;
if (r != 4) {
/* Internal error -- should not happen. */
- fprintf (stderr, "libguestfs: %s: %s: internal error: pcre_exec returned unexpected error code %d when matching against the string \"%s\"\n",
+ warning (g, "%s: %s: internal error: pcre_exec returned unexpected error code %d when matching against the string \"%s\"",
__FILE__, __func__, r, str);
return 0;
}