X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fblockdev.c;h=35d14bf8523187cee8a1622fa8306bd0bd887745;hb=98869b86413ff59afa009f9d06ebc0cc4477ab31;hp=2c075ef83dd80bd7c69a7bedf506061ae34e1eed;hpb=170f262f0413de843af62b968f6d12c1c476ae7f;p=libguestfs.git diff --git a/daemon/blockdev.c b/daemon/blockdev.c index 2c075ef..35d14bf 100644 --- a/daemon/blockdev.c +++ b/daemon/blockdev.c @@ -1,5 +1,5 @@ /* libguestfs - the guestfsd daemon - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009 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 @@ -32,7 +32,7 @@ * we centralize it in one call. */ static int64_t -call_blockdev (const char *device, const char *switc, int extraarg, int prints) +call_blockdev (char *device, char *switc, int extraarg, int prints) { int r; int64_t rv; @@ -80,37 +80,37 @@ call_blockdev (const char *device, const char *switc, int extraarg, int prints) } int -do_blockdev_setro (const char *device) +do_blockdev_setro (char *device) { return (int) call_blockdev (device, "--setro", 0, 0); } int -do_blockdev_setrw (const char *device) +do_blockdev_setrw (char *device) { return (int) call_blockdev (device, "--setrw", 0, 0); } int -do_blockdev_getro (const char *device) +do_blockdev_getro (char *device) { return (int) call_blockdev (device, "--getro", 0, 1); } int -do_blockdev_getss (const char *device) +do_blockdev_getss (char *device) { return (int) call_blockdev (device, "--getss", 0, 1); } int -do_blockdev_getbsz (const char *device) +do_blockdev_getbsz (char *device) { return (int) call_blockdev (device, "--getbsz", 0, 1); } int -do_blockdev_setbsz (const char *device, int blocksize) +do_blockdev_setbsz (char *device, int blocksize) { if (blocksize <= 0 /* || blocksize >= what? */) { reply_with_error ("blockdev_setbsz: blocksize must be > 0"); @@ -120,25 +120,25 @@ do_blockdev_setbsz (const char *device, int blocksize) } int64_t -do_blockdev_getsz (const char *device) +do_blockdev_getsz (char *device) { return call_blockdev (device, "--getsz", 0, 1); } int64_t -do_blockdev_getsize64 (const char *device) +do_blockdev_getsize64 (char *device) { return call_blockdev (device, "--getsize64", 0, 1); } int -do_blockdev_flushbufs (const char *device) +do_blockdev_flushbufs (char *device) { return call_blockdev (device, "--flushbufs", 0, 0); } int -do_blockdev_rereadpt (const char *device) +do_blockdev_rereadpt (char *device) { return call_blockdev (device, "--rereadpt", 0, 0); }