summaryrefslogtreecommitdiffstats
path: root/daemon/guestfsd.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Rearrange and tidy up code in guestfsd.cRichard Jones2009-09-221-30/+74
| | | | | | | | | | | | | | | This just tidies up the main() function in the daemon. There is no longer a huge fixed-sized buffer used for the kernel command line. Variables are moved closer to where they are used. Some local variables turned out to be unused - these are removed. Finally the part that reads the kernel command line is moved into a separate function. There is only minimal functional change here (it now prints out the kernel command line). Literal '4' replaced with 'sizeof' expression, at Jim Meyering's suggestion during patch review.
* Remove explicit guestfs=10.0.2.4:6666 kernel command line parameter.Richard Jones2009-09-171-57/+21
| | | | | | | | | | Since we control the appliance tightly, we can just specify that it will always use a particular host and port, and we don't need to pass it on the command line each time. Also the VMCHANNEL_* constants are only relevant to the particular guestfwd vmchannel implementation, so we rename them as GUESTFWD_*.
* Daemon: fix handling of errors from xread and xwrite.Richard Jones2009-09-171-1/+2
| | | | | | If xread or xwrite returns -1, that indicates an error and we should exit. Note that xread/xwrite has already printed the error message.
* Remove redundant macro.Richard W.M. Jones2009-08-171-2/+0
|
* guestfsd.c: don't perform arithmetic on void pointersJim Meyering2009-08-171-2/+4
| | | | * daemon/guestfsd.c (xread, xwrite): Use char* pointers instead.
* adjust const "**" pointers to avoid warningsJim Meyering2009-08-171-10/+10
| | | | | | Also, ... * src/generator.ml: Add DeviceList type, and propagate that change out to all calling/interface code.
* appliance: Replace LANG=C with LC_ALL=CRichard Jones2009-08-131-1/+1
|
* guestfsd.c: correct s/IS_DEVICE/RESOLVE_DEVICE/ in another commentJim Meyering2009-08-131-1/+1
|
* build: avoid warnings in daemon/guestfsd.cJim Meyering2009-08-101-2/+2
| | | | | * daemon/guestfsd.c (print_arginfo, print_shell_quote): Mark each "info" parameter as unused.
* Convert all TABs-as-indentation to spaces.Jim Meyering2009-08-031-32/+32
| | | | | | | | | | | Do it by running this command: [exempted files are matched via .x-sc_TAB_in_indentation] git ls-files \ | pcregrep -vf .x-sc_TAB_in_indentation \ | xargs pcregrep -l '^ *\t' \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
* build: reenable "syntax-check" rule: sc_const_long_optionJim Meyering2009-08-031-1/+1
| | | | | | | * cfg.mk (disable_temporarily): Remove sc_const_long_option. * daemon/guestfsd.c (main): Declare long_options to be "const". * fish/fish.c (main): Likewise. * test-tool/test-tool.c (main): Likewise.
* Replace shell_quote function with %Q and %R printf specifiers.Richard Jones2009-07-281-26/+78
| | | | | | | %Q => simple shell quoted string %R => path will be prefixed by /sysroot eg. snprintf (cmd, sizeof cmd, "cat %R", path); system (cmd);
* Make /sysroot path configurable.Richard Jones2009-07-181-0/+23
| | | | | | | | | Currently /sysroot is hard-coded throughout the daemon code. This patch turns the path into a variable so that we can change it in future, for example to allow standalone mode to be implemented. This patch was tested by running all the C API tests successfully.
* avoid leak upon failed reallocJim Meyering2009-07-031-8/+12
| | | | | * daemon/guestfsd.c (commandrv): Free original buffer (rather than leaking it) if realloc fails.
* remove trailing blanksJim Meyering2009-07-031-1/+1
|
* Call 'udevadm settle' after operations which add/remove device nodes.Richard W.M. Jones2009-07-011-0/+13
| | | | | | | | | | | | | Because udev operates asynchronously, we found errors which were caused by a previous command (eg. sfdisk or pvremove) creating or removing a device, and that change not having happened by the time the next command was run. This patch adds calls to '/sbin/udevadm settle' after any commands which can add or remove device nodes. If udev is not being used or not available, this should have no effect. The command fails and this is silently ignored.
* Change to use virtio_blk (virtio block device) by default.Richard W.M. Jones2009-07-011-1/+1
| | | | | | | | | | | | | virtio_blk is the fast, virt-native block device driver supported by qemu and KVM. Note that virtio_blk device names are called /dev/vd*. Existing scripts should continue working because device name translation will silently change device names of the form /dev/sd* to /dev/vd* as required. See also: http://libguestfs.org/guestfs.3.html#block_device_naming
* Generated code for mknod, mkfifo, mknod_b, mknod_c, umask.Richard W.M. Jones2009-06-301-0/+3
|
* Check return value from waitpid call in command*() functions.Richard W.M. Jones2009-06-201-2/+6
|
* Implement device name translation. Remove device name hacks in tests.Richard Jones2009-06-101-0/+49
|
* In daemon, set PATH, SHELL and LANG environment variables.Richard Jones2009-05-221-0/+8
|
* Refactor line splitting code in the daemon, and fix it so it works.Richard Jones2009-05-121-0/+54
|
* Fix leak in realloc failure (Jim Meyering).Richard Jones2009-05-071-16/+14
|
* Add generated code for 'fsck' command.Richard Jones2009-04-301-4/+61
|
* Fix unchecked malloc & realloc in 'commandv' func (Jim Meyering).Richard Jones2009-04-301-4/+15
|
* Various fixes to the daemon:Richard Jones2009-04-201-0/+47
| | | | | | - make sure SIGPIPE doesn't kill us - warn not to use macros in FileIn functions - add shell_quote function
* Fix file descriptor leak in daemon.Richard Jones2009-04-201-0/+13
|
* Implement upload and download commands.Richard Jones2009-04-201-4/+16
|
* Use GUESTFS_LAUNCH_FLAG in the daemon, and use correct uint32_t.Richard Jones2009-04-191-2/+2
|
* Added test suite.Richard Jones2009-04-111-33/+55
|
* Implement list-devices and list-partitions.Richard Jones2009-04-061-0/+24
|
* Implementations of 'cat', 'ls', and some cleanups.Richard Jones2009-04-061-0/+32
|
* Implement RString and RStringList return types.Richard Jones2009-04-041-8/+22
| | | | | - implement 'll' command. - outlines for 'ls' and 'cat' commands.
* Implemented 'mount' and 'touch' commands.Richard Jones2009-04-031-22/+171
|
* Makes a series of non-trivial calls.Richard Jones2009-04-031-0/+20
|
* Daemon and library are mostly talking to each other now.Richard Jones2009-04-031-3/+24
|
* Add the first version of the guestfsd daemon.Richard Jones2009-04-031-0/+205