summaryrefslogtreecommitdiffstats
path: root/daemon/upload.c
Commit message (Collapse)AuthorAgeFilesLines
* daemon: Don't need to prefix error messages with the command name.Richard Jones2010-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | 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:..)
* Use STRPREFIX instead of STREQLEN.Richard Jones2009-11-221-2/+2
|
* change strncmp() == 0 to STREQLEN()Jim Meyering2009-11-091-2/+2
| | | | | git grep -l 'strncmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrncmp( *\(.*?\)) *== *0\b/STREQLEN$1/g'
* daemon: diagnose socket write failureJim Meyering2009-08-201-1/+3
| | | | | | | | | * daemon/proto.c (send_chunk): Don't ignore socket-write error. * daemon/proto.c (send_file_end): Return "int", not void, so we can propagate send_chunk failure to caller. * daemon/daemon.h (send_file_end): Update prototype. * daemon/tar.c (do_tar_out, do_tgz_out): Update uses of send_file_end. * daemon/upload.c (do_download): Likewise.
* generator.ml: finish adding Dev_or_Path supportJim Meyering2009-08-131-2/+0
| | | | | | | | | | * src/generator.ml: Update all rules to handle Dev_or_Path. (the above changes to generator.ml are mostly mechanical) Emit a use of REQUIRE_ROOT_OR_RESOLVE_DEVICE. * daemon/upload.c (do_download): Remove use of REQUIRE_ROOT_OR_RESOLVE_DEVICE, now that it's automatically done in calling code. * daemon/file.c (do_file): Likewise.
* generator.ml: use new "Pathname" designationJim Meyering2009-08-131-2/+2
| | | | | | | | | | 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.
* s/NEED_ROOT_OR_IS_DEVICE/REQUIRE_ROOT_OR_RESOLVE_DEVICE/Jim Meyering2009-08-131-1/+1
|
* change almost all uses: s/IS_DEVICE/RESOLVE_DEVICE/Jim Meyering2009-08-131-1/+1
| | | | | | Use this command: git grep -l -w IS_DEVICE|xargs perl -pi -e \ 's/\b(?:IS_DEVICE)\b( \(.*?,) (.*?)\)/RESOLVE_DEVICE$1 return $2)/'
* remove trailing blanksJim Meyering2009-07-031-1/+1
|
* In the daemon, change all const char * parameters to char *.Richard Jones2009-06-101-2/+2
|
* Some fixes to daemon upload command:Richard Jones2009-04-201-3/+12
| | | | | - don't leak the file descriptor along error paths - can't use those macros in FileIn functions
* Implement upload and download commands.Richard Jones2009-04-201-4/+91
|
* Rewrite of main loop impl, start of FileIn/FileOut support.Richard Jones2009-04-181-0/+40