X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fstubs.c;h=51a756249991ae9abf22469f7d6d4511a0cd5225;hb=80c5acfd148ede4ec1ca2dc2330b043b0cea29d5;hp=2df8bbacbf8ca876018f93ab16dc246cd48b3e28;hpb=1fc41b39dac877ccec1284da8bb14baa4df368b8;p=libguestfs.git diff --git a/daemon/stubs.c b/daemon/stubs.c index 2df8bba..51a7562 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -2695,6 +2695,30 @@ done: xdr_free ((xdrproc_t) xdr_guestfs_find_args, (char *) &args); } +static void e2fsck_f_stub (XDR *xdr_in) +{ + int r; + struct guestfs_e2fsck_f_args args; + const char *device; + + memset (&args, 0, sizeof args); + + if (!xdr_guestfs_e2fsck_f_args (xdr_in, &args)) { + reply_with_error ("%s: daemon failed to decode procedure arguments", "e2fsck_f"); + return; + } + device = args.device; + + r = do_e2fsck_f (device); + if (r == -1) + /* do_e2fsck_f has already called reply_with_error */ + goto done; + + reply (NULL, NULL); +done: + xdr_free ((xdrproc_t) xdr_guestfs_e2fsck_f_args, (char *) &args); +} + void dispatch_incoming_message (XDR *xdr_in) { switch (proc_nr) { @@ -3019,6 +3043,9 @@ void dispatch_incoming_message (XDR *xdr_in) case GUESTFS_PROC_FIND: find_stub (xdr_in); break; + case GUESTFS_PROC_E2FSCK_F: + e2fsck_f_stub (xdr_in); + break; default: reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr); }