/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct mount_ctx *ctx = (struct mount_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, mount_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_mount");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct sync_ctx *ctx = (struct sync_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, sync_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_sync");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct touch_ctx *ctx = (struct touch_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, touch_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_touch");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct cat_ctx *ctx = (struct cat_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, cat_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_cat");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct ll_ctx *ctx = (struct ll_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, ll_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_ll");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct ls_ctx *ctx = (struct ls_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, ls_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_ls");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct list_devices_ctx *ctx = (struct list_devices_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, list_devices_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_list_devices");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct list_partitions_ctx *ctx = (struct list_partitions_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, list_partitions_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_list_partitions");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct pvs_ctx *ctx = (struct pvs_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, pvs_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_pvs");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct vgs_ctx *ctx = (struct vgs_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, vgs_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_vgs");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct lvs_ctx *ctx = (struct lvs_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, lvs_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_lvs");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct pvs_full_ctx *ctx = (struct pvs_full_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, pvs_full_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_pvs_full");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct vgs_full_ctx *ctx = (struct vgs_full_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, vgs_full_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_vgs_full");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct lvs_full_ctx *ctx = (struct lvs_full_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, lvs_full_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_lvs_full");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct read_lines_ctx *ctx = (struct read_lines_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, read_lines_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_read_lines");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_init_ctx *ctx = (struct aug_init_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_init_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_init");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_close_ctx *ctx = (struct aug_close_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_close_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_close");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_defvar_ctx *ctx = (struct aug_defvar_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_defvar_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_defvar");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_defnode_ctx *ctx = (struct aug_defnode_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_defnode_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_defnode");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_get_ctx *ctx = (struct aug_get_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_get_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_get");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_set_ctx *ctx = (struct aug_set_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_set_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_set");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_insert_ctx *ctx = (struct aug_insert_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_insert_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_insert");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_rm_ctx *ctx = (struct aug_rm_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_rm_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_rm");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_mv_ctx *ctx = (struct aug_mv_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_mv_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_mv");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_match_ctx *ctx = (struct aug_match_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_match_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_match");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_save_ctx *ctx = (struct aug_save_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_save_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_save");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_load_ctx *ctx = (struct aug_load_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_load_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_load");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct aug_ls_ctx *ctx = (struct aug_ls_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, aug_ls_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_aug_ls");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct rm_ctx *ctx = (struct rm_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, rm_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_rm");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct rmdir_ctx *ctx = (struct rmdir_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, rmdir_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_rmdir");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct rm_rf_ctx *ctx = (struct rm_rf_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, rm_rf_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_rm_rf");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct mkdir_ctx *ctx = (struct mkdir_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, mkdir_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_mkdir");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct mkdir_p_ctx *ctx = (struct mkdir_p_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, mkdir_p_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_mkdir_p");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct chmod_ctx *ctx = (struct chmod_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, chmod_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_chmod");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct chown_ctx *ctx = (struct chown_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, chown_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_chown");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct exists_ctx *ctx = (struct exists_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, exists_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_exists");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct is_file_ctx *ctx = (struct is_file_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, is_file_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_is_file");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct is_dir_ctx *ctx = (struct is_dir_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, is_dir_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_is_dir");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct pvcreate_ctx *ctx = (struct pvcreate_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, pvcreate_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_pvcreate");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct vgcreate_ctx *ctx = (struct vgcreate_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, vgcreate_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_vgcreate");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct lvcreate_ctx *ctx = (struct lvcreate_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, lvcreate_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_lvcreate");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct mkfs_ctx *ctx = (struct mkfs_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, mkfs_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_mkfs");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct sfdisk_ctx *ctx = (struct sfdisk_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, sfdisk_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_sfdisk");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct write_file_ctx *ctx = (struct write_file_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, write_file_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_write_file");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct umount_ctx *ctx = (struct umount_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, umount_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_umount");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct mounts_ctx *ctx = (struct mounts_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, mounts_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_mounts");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct umount_all_ctx *ctx = (struct umount_all_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, umount_all_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_umount_all");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct lvm_remove_all_ctx *ctx = (struct lvm_remove_all_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, lvm_remove_all_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_lvm_remove_all");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct file_ctx *ctx = (struct file_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, file_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_file");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct command_ctx *ctx = (struct command_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, command_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_command");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct command_lines_ctx *ctx = (struct command_lines_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, command_lines_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_command_lines");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct stat_ctx *ctx = (struct stat_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, stat_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_stat");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct lstat_ctx *ctx = (struct lstat_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, lstat_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_lstat");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct statvfs_ctx *ctx = (struct statvfs_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, statvfs_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_statvfs");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct tune2fs_l_ctx *ctx = (struct tune2fs_l_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return NULL;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, tune2fs_l_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_tune2fs_l");
return NULL;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_setro_ctx *ctx = (struct blockdev_setro_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_setro_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_setro");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_setrw_ctx *ctx = (struct blockdev_setrw_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_setrw_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_setrw");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_getro_ctx *ctx = (struct blockdev_getro_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_getro_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_getro");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_getss_ctx *ctx = (struct blockdev_getss_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_getss_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_getss");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_getbsz_ctx *ctx = (struct blockdev_getbsz_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_getbsz_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_getbsz");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_setbsz_ctx *ctx = (struct blockdev_setbsz_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_setbsz_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_setbsz");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_getsz_ctx *ctx = (struct blockdev_getsz_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_getsz_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_getsz");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_getsize64_ctx *ctx = (struct blockdev_getsize64_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
return;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_getsize64_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_getsize64");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_flushbufs_ctx *ctx = (struct blockdev_flushbufs_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_flushbufs_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_flushbufs");
return -1;
}
/* This flag is set by the callbacks, so we know we've done
* the callbacks as expected, and in the right sequence.
* 0 = not called, 1 = send called,
- * 2.. = send_file called,
- * 1000 = reply called.
+ * 1001 = reply called.
*/
int cb_sequence;
struct guestfs_message_header hdr;
guestfs_main_loop *ml = guestfs_get_main_loop (g);
struct blockdev_rereadpt_ctx *ctx = (struct blockdev_rereadpt_ctx *) data;
- guestfs__switch_to_receiving (g);
ctx->cb_sequence = 1;
ml->main_loop_quit (ml, g);
}
goto done;
}
done:
- ctx->cb_sequence = 1000;
+ ctx->cb_sequence = 1001;
ml->main_loop_quit (ml, g);
}
return -1;
}
+ guestfs__switch_to_receiving (g);
ctx.cb_sequence = 0;
guestfs_set_reply_callback (g, blockdev_rereadpt_reply_cb, &ctx);
(void) ml->main_loop_run (ml, g);
guestfs_set_reply_callback (g, NULL, NULL);
- if (ctx.cb_sequence != 1000) {
+ if (ctx.cb_sequence != 1001) {
error (g, "%s reply failed, see earlier error messages", "guestfs_blockdev_rereadpt");
return -1;
}
return 0;
}
+struct upload_ctx {
+ /* This flag is set by the callbacks, so we know we've done
+ * the callbacks as expected, and in the right sequence.
+ * 0 = not called, 1 = send called,
+ * 1001 = reply called.
+ */
+ int cb_sequence;
+ struct guestfs_message_header hdr;
+ struct guestfs_message_error err;
+};
+
+static void upload_send_cb (guestfs_h *g, void *data)
+{
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ struct upload_ctx *ctx = (struct upload_ctx *) data;
+
+ ctx->cb_sequence = 1;
+ ml->main_loop_quit (ml, g);
+}
+
+static void upload_reply_cb (guestfs_h *g, void *data, XDR *xdr)
+{
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ struct upload_ctx *ctx = (struct upload_ctx *) data;
+
+ if (!xdr_guestfs_message_header (xdr, &ctx->hdr)) {
+ error (g, "%s: failed to parse reply header", "guestfs_upload");
+ return;
+ }
+ if (ctx->hdr.status == GUESTFS_STATUS_ERROR) {
+ if (!xdr_guestfs_message_error (xdr, &ctx->err)) {
+ error (g, "%s: failed to parse reply error", "guestfs_upload");
+ return;
+ }
+ goto done;
+ }
+ done:
+ ctx->cb_sequence = 1001;
+ ml->main_loop_quit (ml, g);
+}
+
+int guestfs_upload (guestfs_h *g,
+ const char *filename,
+ const char *remotefilename)
+{
+ struct guestfs_upload_args args;
+ struct upload_ctx ctx;
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ int serial;
+
+ if (check_state (g, "guestfs_upload") == -1) return -1;
+
+ memset (&ctx, 0, sizeof ctx);
+
+ args.remotefilename = (char *) remotefilename;
+ serial = guestfs__send (g, GUESTFS_PROC_UPLOAD,
+ (xdrproc_t) xdr_guestfs_upload_args, (char *) &args);
+ if (serial == -1)
+ return -1;
+
+ ctx.cb_sequence = 0;
+ guestfs_set_send_callback (g, upload_send_cb, &ctx);
+ (void) ml->main_loop_run (ml, g);
+ guestfs_set_send_callback (g, NULL, NULL);
+ if (ctx.cb_sequence != 1) {
+ error (g, "%s send failed, see earlier error messages", "guestfs_upload");
+ return -1;
+ }
+
+ if (guestfs__send_file_sync (ml, g, filename) == -1)
+ return -1;
+
+ guestfs__switch_to_receiving (g);
+ ctx.cb_sequence = 0;
+ guestfs_set_reply_callback (g, upload_reply_cb, &ctx);
+ (void) ml->main_loop_run (ml, g);
+ guestfs_set_reply_callback (g, NULL, NULL);
+ if (ctx.cb_sequence != 1001) {
+ error (g, "%s reply failed, see earlier error messages", "guestfs_upload");
+ return -1;
+ }
+
+ if (check_reply_header (g, &ctx.hdr, GUESTFS_PROC_UPLOAD, serial) == -1)
+ return -1;
+
+ if (ctx.hdr.status == GUESTFS_STATUS_ERROR) {
+ error (g, "%s", ctx.err.error_message);
+ return -1;
+ }
+
+ return 0;
+}
+
+struct download_ctx {
+ /* This flag is set by the callbacks, so we know we've done
+ * the callbacks as expected, and in the right sequence.
+ * 0 = not called, 1 = send called,
+ * 1001 = reply called.
+ */
+ int cb_sequence;
+ struct guestfs_message_header hdr;
+ struct guestfs_message_error err;
+};
+
+static void download_send_cb (guestfs_h *g, void *data)
+{
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ struct download_ctx *ctx = (struct download_ctx *) data;
+
+ ctx->cb_sequence = 1;
+ ml->main_loop_quit (ml, g);
+}
+
+static void download_reply_cb (guestfs_h *g, void *data, XDR *xdr)
+{
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ struct download_ctx *ctx = (struct download_ctx *) data;
+
+ if (!xdr_guestfs_message_header (xdr, &ctx->hdr)) {
+ error (g, "%s: failed to parse reply header", "guestfs_download");
+ return;
+ }
+ if (ctx->hdr.status == GUESTFS_STATUS_ERROR) {
+ if (!xdr_guestfs_message_error (xdr, &ctx->err)) {
+ error (g, "%s: failed to parse reply error", "guestfs_download");
+ return;
+ }
+ goto done;
+ }
+ done:
+ ctx->cb_sequence = 1001;
+ ml->main_loop_quit (ml, g);
+}
+
+int guestfs_download (guestfs_h *g,
+ const char *remotefilename,
+ const char *filename)
+{
+ struct guestfs_download_args args;
+ struct download_ctx ctx;
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ int serial;
+
+ if (check_state (g, "guestfs_download") == -1) return -1;
+
+ memset (&ctx, 0, sizeof ctx);
+
+ args.remotefilename = (char *) remotefilename;
+ serial = guestfs__send (g, GUESTFS_PROC_DOWNLOAD,
+ (xdrproc_t) xdr_guestfs_download_args, (char *) &args);
+ if (serial == -1)
+ return -1;
+
+ ctx.cb_sequence = 0;
+ guestfs_set_send_callback (g, download_send_cb, &ctx);
+ (void) ml->main_loop_run (ml, g);
+ guestfs_set_send_callback (g, NULL, NULL);
+ if (ctx.cb_sequence != 1) {
+ error (g, "%s send failed, see earlier error messages", "guestfs_download");
+ return -1;
+ }
+
+ guestfs__switch_to_receiving (g);
+ ctx.cb_sequence = 0;
+ guestfs_set_reply_callback (g, download_reply_cb, &ctx);
+ (void) ml->main_loop_run (ml, g);
+ guestfs_set_reply_callback (g, NULL, NULL);
+ if (ctx.cb_sequence != 1001) {
+ error (g, "%s reply failed, see earlier error messages", "guestfs_download");
+ return -1;
+ }
+
+ if (check_reply_header (g, &ctx.hdr, GUESTFS_PROC_DOWNLOAD, serial) == -1)
+ return -1;
+
+ if (ctx.hdr.status == GUESTFS_STATUS_ERROR) {
+ error (g, "%s", ctx.err.error_message);
+ return -1;
+ }
+
+ if (guestfs__receive_file_sync (ml, g, filename) == -1)
+ return -1;
+
+ return 0;
+}
+