/* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc.
+ * Copyright (C) 2009-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
free (cmd);
while ((r = input_to_nul (fp, str, PATH_MAX)) > 0) {
- if (verbose)
- printf ("find string: %s\n", str);
-
len = strlen (str);
if (len <= sysrootdirlen)
continue;
reply (NULL, NULL);
while ((r = input_to_nul (fp, str, GUESTFS_MAX_CHUNK_SIZE)) > 0) {
- if (verbose)
- printf ("find0 string: %s\n", str);
-
len = strlen (str);
if (len <= sysrootdirlen)
continue;
/* libguestfs - the guestfsd daemon
- * Copyright (C) 2010 Red Hat Inc.
+ * Copyright (C) 2010-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static int
set_filter (const char *filter)
{
- if (verbose)
- fprintf (stderr, "LVM: setting device filter to %s\n", filter);
-
FILE *ifp = fopen ("/etc/lvm/lvm.conf", "r");
if (ifp == NULL) {
reply_with_perror ("open: /etc/lvm/lvm.conf");
while (getline (&line, &len, ifp) != -1) {
int r;
if (is_filter_line (line)) {
- if (verbose)
- fprintf (stderr, "LVM: replacing config line:\n%s", line);
r = fprintf (ofp, " filter = [ %s ]\n", filter);
} else {
r = fprintf (ofp, "%s", line);
/* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc.
+ * Copyright (C) 2009-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
if (result >= 0)
return result;
- if (verbose)
- fprintf (stderr, "Testing if this parted supports '-m' option.\n");
-
char *err = NULL;
int r = commandr (NULL, &err, "parted", "-s", "-m", "/dev/null", NULL);
if (r == -1) {
}
free (err);
- if (verbose)
- fprintf (stderr, "parted output:\n%s<END>\n", out);
-
return out;
}
/* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc.
+ * Copyright (C) 2009-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
sock = _sock;
for (;;) {
- /* Most common errors are leaked memory and leaked file descriptors,
- * so run this between each command:
- */
- if (verbose && 0)
- ignore_value (system ("ls -l /proc/self/fd"));
-
/* Read the length word. */
if (xread (sock, lenbuf, 4) == -1)
exit (EXIT_FAILURE);
/* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc.
+ * Copyright (C) 2009-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
continue;
}
- if (verbose)
- fprintf (stderr, "case_sensitive_path: path = %s, next = %zu, i = %zu\n",
- path, next, i);
-
if ((i == 1 && path[0] == '.') ||
(i == 2 && path[0] == '.' && path[1] == '.')) {
reply_with_error ("path contained . or .. elements");
/* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc.
+ * Copyright (C) 2009-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
HANDLE drive;
DWORD drive_type;
- if (verbose)
- fprintf (stderr, "sync_win32: examining drive %s\n", p);
-
/* Ignore removable drives. */
drive_type = GetDriveType (p);
if (drive_type == DRIVE_FIXED) {
NULL, OPEN_EXISTING, 0, 0);
if (drive == INVALID_HANDLE_VALUE)
return -1;
- if (verbose)
- fprintf (stderr, "sync_win32: flushing %s\n", volname);
BOOL r;
/* This always fails in Wine:
/* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc.
+ * Copyright (C) 2009-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
}
}
- /* If verbose, debug what we're about to send back. */
- if (verbose) {
- fprintf (stderr, "lxattrlist: returning: [\n");
- for (k = 0; k < ret->guestfs_int_xattr_list_len; ++k) {
- const guestfs_int_xattr *entry = &ret->guestfs_int_xattr_list_val[k];
- if (STRNEQ (entry[0].attrname, "")) {
- fprintf (stderr, "ERROR: expecting empty attrname at k = %zu\n", k);
- break;
- }
- fprintf (stderr, " %zu: special attrval = %s\n",
- k, entry[0].attrval.attrval_val);
- for (i = 1; k+i < ret->guestfs_int_xattr_list_len; ++i) {
- if (STREQ (entry[i].attrname, ""))
- break;
- fprintf (stderr, " name %s, value length %d\n",
- entry[i].attrname, entry[i].attrval.attrval_len);
- }
- k += i-1;
- }
- fprintf (stderr, "]\n");
- }
-
return ret;
error: