Commit Graph

14 Commits

Author SHA1 Message Date
Matthew Booth
04ea1375c5 Update FSF address. 2011-11-08 14:43:07 +00:00
Richard W.M. Jones
3135b8c378 Coverity: Don't leak error strings. 2011-06-09 10:53:23 +01:00
Richard Jones
9e0b31a2af appliance: Set $PATH instead of hard-coding paths to binaries everywhere.
Change the appliance so PATH includes common directories.  Thus
we don't need to hard-code paths to binaries (eg. "/sbin/fdisk")
everywhere.
2010-03-26 13:36:30 +00:00
Richard Jones
e9c3711310 daemon: Don't need to prefix error messages with the command name.
The RPC stubs already prefix the command name to error messages.
The daemon doesn't have to do this.  As a (small) benefit this also
makes the daemon slightly smaller.

Code in the daemon such as:

  if (argv[0] == NULL) {
    reply_with_error ("passed an empty list");
    return NULL;
  }

now results in error messages like this:

  ><fs> command ""
  libguestfs: error: command: passed an empty list

(whereas previously you would have seen ..command: command:..)
2010-02-12 16:49:00 +00:00
Richard Jones
3cf719bc07 Fix prototype of commandv to match prototype of commandrv. 2009-11-09 11:05:19 +00:00
Jim Meyering
29e7b9908e wc, blockdev: avoid warnings about discarding "const" qualifiers
* daemon/wc.c (wc): Make "flag" param const.
* daemon/blockdev.c (call_blockdev): Likewise, for "switc".
2009-08-17 11:40:24 +02:00
Jim Meyering
adf20c0c4d adjust const "**" pointers to avoid warnings
Also, ...
* src/generator.ml: Add DeviceList type, and propagate that change
out to all calling/interface code.
2009-08-17 11:40:24 +02:00
Jim Meyering
84fc760439 generator.ml: use new "Pathname" designation
Nearly every file-related function in daemons/*.c is affected:
Remove this pair of statements from each affected do_* function:
-  NEED_ROOT (return -1);
-  ABS_PATH (dir, return -1);
and change the type of the corresponding parameter to "const char *".
* src/generator.ml: Emit NEED_ROOT just once, even when there are two or
more Pathname args.
2009-08-13 14:45:34 +02:00
Jim Meyering
0c07f0d236 * src/generator.ml: Change all String "device"' to Device "device"'.
Then update each affected function, removing each uses of RESOLVE_DEVICE,
now that it's generated in caller from stub.c.
* daemon/blockdev.c (call_blockdev): Remove use of RESOLVE_DEVICE.
* daemon/devsparts.c (do_mkfs): Likewise.
* daemon/ext2.c (do_e2fsck_f, do_get_e2label, do_get_e2uuid): Likewise.
(do_resize2fs, do_set_e2label, do_set_e2uuid, do_tune2fs_l): Likewise.
* daemon/fsck.c (do_fsck): Likewise.
* daemon/grub.c (do_grub_install): Likewise.
* daemon/lvm.c (do_lvremove, do_pvcreate, do_pvremove): Likewise.
(do_pvresize): Likewise.
* daemon/mount.c (do_mount_vfs): Likewise.
* daemon/ntfs.c (do_ntfs_3g_probe): Likewise.
* daemon/scrub.c (do_scrub_device): Likewise.
* daemon/sfdisk.c (sfdisk, sfdisk_flag): Likewise.
* daemon/swap.c (do_mkswap, do_mkswap_L, do_mkswap_U): Likewise.
(do_swapoff_device, do_swapon_device): Likewise.
* daemon/zero.c (do_zero): Likewise.
* daemon/zerofree.c (do_zerofree): Likewise.
2009-08-13 14:45:34 +02:00
Jim Meyering
1997858e90 change almost all uses: s/IS_DEVICE/RESOLVE_DEVICE/
Use this command:
  git grep -l -w IS_DEVICE|xargs perl -pi -e \
    's/\b(?:IS_DEVICE)\b( \(.*?,) (.*?)\)/RESOLVE_DEVICE$1 return $2)/'
2009-08-13 14:45:33 +02:00
Jim Meyering
a7b73d4a1e remove trailing blanks 2009-07-03 17:04:21 +02:00
Richard Jones
56bef498f4 In the daemon, change all const char * parameters to char *. 2009-06-10 14:16:47 +01:00
Richard Jones
170f262f04 Implement upload and download commands. 2009-04-20 00:22:02 +01:00
Richard Jones
e038597ebd Added blockdev_* calls. RInt64 type. Enhanced tests. 2009-04-15 17:47:34 +01:00