rsync/rsync.git
19 years agoMoved the checks for --ignore-existing and --update higher in
Wayne Davison [Thu, 3 Mar 2005 01:33:51 +0000 (01:33 +0000)]
Moved the checks for --ignore-existing and --update higher in
recv_generator() so that they don't trigger erroneously when
--link-dest is specified.

19 years ago- Got rid of the SID_* flags -- use the ITEM_* flags directly.
Wayne Davison [Thu, 3 Mar 2005 00:14:35 +0000 (00:14 +0000)]
- Got rid of the SID_* flags -- use the ITEM_* flags directly.
- If --compare-dest find a file that is not the same in attributes,
  we need to copy the file.

19 years agoAdded ITEM_NO_DEST_AND_NO_UPDATE for use by the generator's
Wayne Davison [Thu, 3 Mar 2005 00:14:32 +0000 (00:14 +0000)]
Added ITEM_NO_DEST_AND_NO_UPDATE for use by the generator's
itemize() function.

19 years agoFixed the --compare-dest docs.
Wayne Davison [Wed, 2 Mar 2005 18:01:23 +0000 (18:01 +0000)]
Fixed the --compare-dest docs.

19 years agoWhen using multiple --compare-dest options, rsync should avoid
Wayne Davison [Wed, 2 Mar 2005 17:48:36 +0000 (17:48 +0000)]
When using multiple --compare-dest options, rsync should avoid
copying a file that has an exact match in any of the dirs.

19 years agoFixed a bug in the --dry-run output when using --link-dest.
Wayne Davison [Wed, 2 Mar 2005 17:27:19 +0000 (17:27 +0000)]
Fixed a bug in the --dry-run output when using --link-dest.

19 years agoIf the multi-dest loop falls back to the best_match index,
Wayne Davison [Wed, 2 Mar 2005 09:51:54 +0000 (09:51 +0000)]
If the multi-dest loop falls back to the best_match index,
we need to re-stat() the file to restore "st".

19 years agoTweaked the description for --rsync-path.
Wayne Davison [Wed, 2 Mar 2005 09:17:42 +0000 (09:17 +0000)]
Tweaked the description for --rsync-path.

19 years agoA little more tweaking to the multi-dest option loop.
Wayne Davison [Wed, 2 Mar 2005 09:09:15 +0000 (09:09 +0000)]
A little more tweaking to the multi-dest option loop.

19 years agoMention that specifying "/dir/**" is a safer way than "/dir/"
Wayne Davison [Wed, 2 Mar 2005 01:48:25 +0000 (01:48 +0000)]
Mention that specifying "/dir/**" is a safer way than "/dir/"
alone to ensure that files inside a dir are fully protected.

19 years agoImproved the description of --rsync-path.
Wayne Davison [Tue, 1 Mar 2005 23:02:23 +0000 (23:02 +0000)]
Improved the description of --rsync-path.

19 years agoMade the multi-FOO-dest loop a little nicer.
Wayne Davison [Tue, 1 Mar 2005 19:42:31 +0000 (19:42 +0000)]
Made the multi-FOO-dest loop a little nicer.

19 years agoExplicitly mention that "del." does include the trailing period.
Wayne Davison [Tue, 1 Mar 2005 19:17:27 +0000 (19:17 +0000)]
Explicitly mention that "del." does include the trailing period.

19 years agoFixed two glitches Paul pointed out.
Wayne Davison [Tue, 1 Mar 2005 17:28:46 +0000 (17:28 +0000)]
Fixed two glitches Paul pointed out.

19 years agoPreparing for release of 2.6.4pre2
Wayne Davison [Tue, 1 Mar 2005 06:22:19 +0000 (06:22 +0000)]
Preparing for release of 2.6.4pre2

19 years agoMention the latest changes.
Wayne Davison [Tue, 1 Mar 2005 06:05:23 +0000 (06:05 +0000)]
Mention the latest changes.

19 years agoA few improvements to the new check_for_hostspec() function.
Wayne Davison [Tue, 1 Mar 2005 05:49:11 +0000 (05:49 +0000)]
A few improvements to the new check_for_hostspec() function.

19 years agoMade the argv/argc parsing a little nicer.
Wayne Davison [Tue, 1 Mar 2005 03:39:35 +0000 (03:39 +0000)]
Made the argv/argc parsing a little nicer.

19 years ago- Look for last '@' in a user@host spec.
Wayne Davison [Tue, 1 Mar 2005 03:39:32 +0000 (03:39 +0000)]
- Look for last '@' in a user@host spec.

19 years agoRemoved section on parsing IPv6 literal addresses.
Wayne Davison [Tue, 1 Mar 2005 03:11:28 +0000 (03:11 +0000)]
Removed section on parsing IPv6 literal addresses.

19 years agoChanged remote_filesfrom_file to filesfrom_host.
Wayne Davison [Tue, 1 Mar 2005 03:10:59 +0000 (03:10 +0000)]
Changed remote_filesfrom_file to filesfrom_host.

19 years ago- Changes needed to handle new filesfrom_host variable.
Wayne Davison [Tue, 1 Mar 2005 01:16:03 +0000 (01:16 +0000)]
- Changes needed to handle new filesfrom_host variable.
- Changes needed to use check_for_hostspec() in place of find_colon().

19 years agoChanges needed to use check_for_hostspec() in place of find_colon().
Wayne Davison [Tue, 1 Mar 2005 01:15:59 +0000 (01:15 +0000)]
Changes needed to use check_for_hostspec() in place of find_colon().

19 years ago- Changed find_colon() into check_for_hostspec(), extending it to
Wayne Davison [Tue, 1 Mar 2005 01:15:57 +0000 (01:15 +0000)]
- Changed find_colon() into check_for_hostspec(), extending it to
  understand the rsync:://HOST:PORT/PATH format, allowing all HOSTs
  to be IPv6 literal addresses enclosed in '[' and ']', and changing
  it to return the 3 parts of the spec separately (host, port, and
  path).
- Relocated the code that handles the sanitation and validation of
  the files_from arg in order to make its placement a little more
  logical.
- Replaced remote_filesfrom_file with filesfrom_host, which makes
  the value of the files_from variable more intuitive.

19 years agoEnhanced the option-parsing failure mode to handle the situation
Wayne Davison [Tue, 1 Mar 2005 00:42:32 +0000 (00:42 +0000)]
Enhanced the option-parsing failure mode to handle the situation
where the parser didn't get a chance to parse the --files-from
option yet, but we still need to know it was there in order to get
the error message back to the client.

19 years agoMade a couple sentences about rsync:// syntax clearer.
Wayne Davison [Mon, 28 Feb 2005 22:04:16 +0000 (22:04 +0000)]
Made a couple sentences about  syntax clearer.

19 years agoImproved a couple sentences.
Wayne Davison [Mon, 28 Feb 2005 02:16:49 +0000 (02:16 +0000)]
Improved a couple sentences.

19 years agoSay "rsync 2.6.4" instead of "protocol 29".
Wayne Davison [Mon, 28 Feb 2005 02:16:23 +0000 (02:16 +0000)]
Say "rsync 2.6.4" instead of "protocol 29".

19 years agoTweaked a comment.
Wayne Davison [Mon, 28 Feb 2005 02:04:42 +0000 (02:04 +0000)]
Tweaked a comment.

19 years agoImproved do_lseek()'s failure message.
Wayne Davison [Sun, 27 Feb 2005 21:12:13 +0000 (21:12 +0000)]
Improved do_lseek()'s failure message.

19 years agoComplain if the run-terminating keep-alive packets aren't what
Wayne Davison [Sun, 27 Feb 2005 20:50:07 +0000 (20:50 +0000)]
Complain if the run-terminating keep-alive packets aren't what
we expected.

19 years agoDon't loop forever when the receiver is waiting around to be killed
Wayne Davison [Sun, 27 Feb 2005 18:24:34 +0000 (18:24 +0000)]
Don't loop forever when the receiver is waiting around to be killed
at EOF -- it should be a rapidly arriving event, so only hang around
for 10 seconds, max., and then go ahead and report the "unexpectedly
closed" error.

19 years agoMake sure that allowed_lull will not be computed as 0 if
Wayne Davison [Sun, 27 Feb 2005 18:09:17 +0000 (18:09 +0000)]
Make sure that allowed_lull will not be computed as 0 if
io_timeout is 1.

19 years agoImproved a couple sentences.
Wayne Davison [Sun, 27 Feb 2005 18:01:32 +0000 (18:01 +0000)]
Improved a couple sentences.

19 years ago- Made the calls to maybe_send_keepalive() happen at better intervals.
Wayne Davison [Sun, 27 Feb 2005 09:02:32 +0000 (09:02 +0000)]
- Made the calls to maybe_send_keepalive() happen at better intervals.
- Call do_hard_links() with its new args.

19 years agoAdded 2 args to do_hard_links() so that it can call maybe_send_keepalive().
Wayne Davison [Sun, 27 Feb 2005 09:02:29 +0000 (09:02 +0000)]
Added 2 args to do_hard_links() so that it can call maybe_send_keepalive().

19 years agoMention the backup fix for redone files with --inplace.
Wayne Davison [Sun, 27 Feb 2005 08:02:06 +0000 (08:02 +0000)]
Mention the backup fix for redone files with --inplace.

19 years agoWe need to turn off make_backups for the redo phase so that
Wayne Davison [Sun, 27 Feb 2005 07:50:43 +0000 (07:50 +0000)]
We need to turn off make_backups for the redo phase so that
the inplace processing doesn't make a second backup.

19 years agoTweaked an error message.
Wayne Davison [Sun, 27 Feb 2005 07:34:27 +0000 (07:34 +0000)]
Tweaked an error message.

19 years ago- Seems to me that sigusr2_handler() should call close_all() for
Wayne Davison [Sun, 27 Feb 2005 07:33:01 +0000 (07:33 +0000)]
- Seems to me that sigusr2_handler() should call close_all() for
  the sake of MS Windows.
- Improved some comments.

19 years agoOne more comment fix.
Wayne Davison [Sat, 26 Feb 2005 22:14:40 +0000 (22:14 +0000)]
One more comment fix.

19 years agoFixed comment.
Wayne Davison [Sat, 26 Feb 2005 22:02:38 +0000 (22:02 +0000)]
Fixed comment.

19 years agoImproved a couple sentences.
Wayne Davison [Sat, 26 Feb 2005 21:48:12 +0000 (21:48 +0000)]
Improved a couple sentences.

19 years agoSet kluge_around_eof to a -1 for the receiver's needs.
Wayne Davison [Sat, 26 Feb 2005 20:58:08 +0000 (20:58 +0000)]
Set kluge_around_eof to a -1 for the receiver's needs.

19 years agoIf kluge_around_eof is < 0, we go into an msleep() loop instead
Wayne Davison [Sat, 26 Feb 2005 20:58:05 +0000 (20:58 +0000)]
If kluge_around_eof is < 0, we go into an msleep() loop instead
of exiting.

19 years agoExplicitly set kluge_around_eof to a 1 when it is needed.
Wayne Davison [Sat, 26 Feb 2005 20:58:01 +0000 (20:58 +0000)]
Explicitly set kluge_around_eof to a 1 when it is needed.

19 years agoAdded keep-alive checking during the directory-touching loop at
Wayne Davison [Sat, 26 Feb 2005 20:43:14 +0000 (20:43 +0000)]
Added keep-alive checking during the directory-touching loop at
the end of the processing.

19 years agoSet kludge_around_eof when the receiver is trying to read a
Wayne Davison [Sat, 26 Feb 2005 20:21:12 +0000 (20:21 +0000)]
Set kludge_around_eof when the receiver is trying to read a
potential keep-alive message that may never come.

19 years agoImproved the comment for kludge_around_eof.
Wayne Davison [Sat, 26 Feb 2005 20:21:08 +0000 (20:21 +0000)]
Improved the comment for kludge_around_eof.

19 years agoAdded "set -x".
Wayne Davison [Sat, 26 Feb 2005 19:49:59 +0000 (19:49 +0000)]
Added "set -x".

19 years agoDecided I like "set -x" after all.
Wayne Davison [Sat, 26 Feb 2005 19:47:43 +0000 (19:47 +0000)]
Decided I like "set -x" after all.

19 years agoDon't allow keep-alive sending if --read-batch is enabled.
Wayne Davison [Sat, 26 Feb 2005 19:37:49 +0000 (19:37 +0000)]
Don't allow keep-alive sending if --read-batch is enabled.

19 years agoMention the new keep-alive handling and the devices-size fix.
Wayne Davison [Sat, 26 Feb 2005 19:17:06 +0000 (19:17 +0000)]
Mention the new keep-alive handling and the devices-size fix.

19 years agoFixed a line-ordering problem.
Wayne Davison [Sat, 26 Feb 2005 19:11:57 +0000 (19:11 +0000)]
Fixed a line-ordering problem.

19 years agoHandle keep-alive messages at the end of the transfer when
Wayne Davison [Sat, 26 Feb 2005 18:57:57 +0000 (18:57 +0000)]
Handle keep-alive messages at the end of the transfer when
--delete-after is happening.

19 years ago- Moved all the file-deletion code here from flist.c and receiver.c.
Wayne Davison [Sat, 26 Feb 2005 18:03:49 +0000 (18:03 +0000)]
- Moved all the file-deletion code here from flist.c and receiver.c.
- Call maybe_send_keepalive() from delete_in_dir() so that a really
  long delete-pass won't timeout.
- Renamed delete_files() -> do_delete_pass().
- Renamed delete_file() -> delete_item().
- Call get_dirlist() with its new arg.

19 years ago- Moved file-deletion code into generator.c.
Wayne Davison [Sat, 26 Feb 2005 18:03:46 +0000 (18:03 +0000)]
- Moved file-deletion code into generator.c.
- Made filesystem_dev a global that the generator can set during its
  delete pass.
- Fixed an off-by-one boundary check in send_directory().
- Added an arg to get_dirlist() so that delete_in_dir() can call it
  efficiently.

19 years agoMoved the delete-after support into generator.c.
Wayne Davison [Sat, 26 Feb 2005 18:03:42 +0000 (18:03 +0000)]
Moved the delete-after support into generator.c.

19 years agoMoved the delete-before support into generator.c.
Wayne Davison [Sat, 26 Feb 2005 18:03:40 +0000 (18:03 +0000)]
Moved the delete-before support into generator.c.

19 years ago- Moved the initialization of "itemizing", "maybe_PERMS_REPORT", and
Wayne Davison [Sat, 26 Feb 2005 06:52:55 +0000 (06:52 +0000)]
- Moved the initialization of "itemizing", "maybe_PERMS_REPORT", and
  "code" from recv_generator() to generate_files() so that they
  don't get recomputed for every file (we pass them as args now).
- Allow protocols < 29 to call maybe_send_keepalive() so that we can
  try to flush the output buffer if things are slow (though we can't
  send a keep-alive packet without protocol_version >= 29).

19 years agoCalling maybe_send_keepalive() for protocol_version < 29 is
Wayne Davison [Sat, 26 Feb 2005 06:43:15 +0000 (06:43 +0000)]
Calling maybe_send_keepalive() for protocol_version < 29 is
now supported, though we can only try to flush the output
buffer if we're in a lull.

19 years ago- Moved the description of '%i's output into the rsync manpage.
Wayne Davison [Sat, 26 Feb 2005 05:18:03 +0000 (05:18 +0000)]
- Moved the description of '%i's output into the rsync manpage.
- A few minor tweaks to the "log format" setting.

19 years ago- We now mention what "%i" outputs under --itemize-changes.
Wayne Davison [Sat, 26 Feb 2005 05:16:26 +0000 (05:16 +0000)]
- We now mention what "%i" outputs under --itemize-changes.
- Improved the description of --log-format.

19 years agoMention the change in when --log-format outputs and how it
Wayne Davison [Sat, 26 Feb 2005 05:11:46 +0000 (05:11 +0000)]
Mention the change in when --log-format outputs and how it
interacts with --verbose.

19 years agoCall log_delete() from delete_file() anytime that DEL_TERSE is
Wayne Davison [Sat, 26 Feb 2005 04:50:55 +0000 (04:50 +0000)]
Call log_delete() from delete_file() anytime that DEL_TERSE is
not set (we used to only call if verbose or log_format were also
set).

19 years agoThe log_delete() function may now be called even when the client is
Wayne Davison [Sat, 26 Feb 2005 04:49:30 +0000 (04:49 +0000)]
The log_delete() function may now be called even when the client is
not getting delete messages, which ensures that the daemon's log-
file output includes all deletions when per-file logging is enabled.

19 years agoMake sure that our protocol-28 compatibility is OK.
Wayne Davison [Sat, 26 Feb 2005 03:22:05 +0000 (03:22 +0000)]
Make sure that our protocol-28 compatibility is OK.

19 years agoFixed a problem sending include rules to an older rsync.
Wayne Davison [Sat, 26 Feb 2005 02:56:30 +0000 (02:56 +0000)]
Fixed a problem sending include rules to an older 

19 years ago- Call maybe_send_keepalive() if timeouts are enabled.
Wayne Davison [Fri, 25 Feb 2005 22:01:36 +0000 (22:01 +0000)]
- Call maybe_send_keepalive() if timeouts are enabled.
- Use the new ignore_timeout variable.

19 years ago- Added variable "ignore_timeout" that lets the generator tell
Wayne Davison [Fri, 25 Feb 2005 21:58:13 +0000 (21:58 +0000)]
- Added variable "ignore_timeout" that lets the generator tell
  us to ignore a timeout without turning off the timeout-related
  time-keeping that the keep-alive processing needs.
- Added a new function:  maybe_send_keepalive().

19 years agoAccept the new keep-alive (no-op) packet.
Wayne Davison [Fri, 25 Feb 2005 21:56:00 +0000 (21:56 +0000)]
Accept the new keep-alive (no-op) packet.

19 years agoDon't add st_size from a device to stats.total_size.
Wayne Davison [Fri, 25 Feb 2005 20:28:27 +0000 (20:28 +0000)]
Don't add st_size from a device to stats.total_size.

19 years agoMention how --backup sometimes implies --omit-dir-times.
Wayne Davison [Fri, 25 Feb 2005 17:10:48 +0000 (17:10 +0000)]
Mention how --backup sometimes implies --omit-dir-times.

19 years agoUse the new am_starting_up value in who_am_i().
Wayne Davison [Fri, 25 Feb 2005 17:08:57 +0000 (17:08 +0000)]
Use the new am_starting_up value in who_am_i().

19 years agoGot rid of kluged value for am_sender, and instead added a new
Wayne Davison [Fri, 25 Feb 2005 17:08:31 +0000 (17:08 +0000)]
Got rid of kluged value for am_sender, and instead added a new
variable named am_starting_up that is non-zero during the option
parsing.  This lets the who_am_i() routine output a better value
for debugging info that is output during the option parsing.

19 years agoFixed some typos.
Wayne Davison [Fri, 25 Feb 2005 02:30:38 +0000 (02:30 +0000)]
Fixed some typos.

19 years agoPreparing for release of 2.6.4pre1
Wayne Davison [Wed, 23 Feb 2005 03:22:53 +0000 (03:22 +0000)]
Preparing for release of 2.6.4pre1

19 years agoTweaked an entry.
Wayne Davison [Wed, 23 Feb 2005 03:17:11 +0000 (03:17 +0000)]
Tweaked an entry.

19 years ago- Fixed a problem with full_fname() when curr_dir was "/".
Wayne Davison [Wed, 23 Feb 2005 02:56:42 +0000 (02:56 +0000)]
- Fixed a problem with full_fname() when curr_dir was "/".
- Made full_fname() consistently output a leading "/" for
  module paths no matter if chroot is in use or not.

19 years agoOne more tweak to the need_name_pipe logic.
Wayne Davison [Wed, 23 Feb 2005 02:14:00 +0000 (02:14 +0000)]
One more tweak to the need_name_pipe logic.

19 years agoCommenting out link-dest test for now.
Wayne Davison [Wed, 23 Feb 2005 02:13:33 +0000 (02:13 +0000)]
Commenting out link-dest test for now.

19 years agoGot rid of --copy-dest references.
Wayne Davison [Wed, 23 Feb 2005 02:07:09 +0000 (02:07 +0000)]
Got rid of --copy-dest references.

19 years agoChanged --copy-dest to --link-dest.
Wayne Davison [Wed, 23 Feb 2005 02:06:33 +0000 (02:06 +0000)]
Changed --copy-dest to --link-dest.

19 years agoGot rid of --copy-dest for now -- I think it should be made to do
Wayne Davison [Wed, 23 Feb 2005 02:05:34 +0000 (02:05 +0000)]
Got rid of --copy-dest for now -- I think it should be made to do
the copying of unchanged files locally (like --link-dest does
using a hard link).

19 years agoFixed a problem with the last change.
Wayne Davison [Tue, 22 Feb 2005 22:13:04 +0000 (22:13 +0000)]
Fixed a problem with the last change.

19 years agoWe need the name-pipe for --inplace these days.
Wayne Davison [Tue, 22 Feb 2005 22:13:02 +0000 (22:13 +0000)]
We need the name-pipe for --inplace these days.

19 years agoAlways set the SID_USING_ALT_BASIS appropriately for the transfer,
Wayne Davison [Tue, 22 Feb 2005 22:12:59 +0000 (22:12 +0000)]
Always set the SID_USING_ALT_BASIS appropriately for the transfer,
even if --inplace wasn't specified.

19 years agoMore cleanups.
Wayne Davison [Tue, 22 Feb 2005 21:56:32 +0000 (21:56 +0000)]
More cleanups.

19 years agoTrying to fix bug #2357.
Wayne Davison [Tue, 22 Feb 2005 21:48:10 +0000 (21:48 +0000)]
Trying to fix bug #2357.

19 years agoWe now look for the ITEM_USING_ALT_BASIS flag for an --inplace
Wayne Davison [Tue, 22 Feb 2005 21:43:59 +0000 (21:43 +0000)]
We now look for the ITEM_USING_ALT_BASIS flag for an --inplace
transer that is using an alternate basis file (instead of reading
an extra byte after the flag word).

19 years agoWe now set the ITEM_USING_ALT_BASIS flag for an --inplace transfer
Wayne Davison [Tue, 22 Feb 2005 21:43:57 +0000 (21:43 +0000)]
We now set the ITEM_USING_ALT_BASIS flag for an --inplace transfer
that is using an alternate basis file (instead of sending an extra
byte after the flag word).

19 years agoAdded ITEM_USING_ALT_BASIS.
Wayne Davison [Tue, 22 Feb 2005 21:43:54 +0000 (21:43 +0000)]
Added ITEM_USING_ALT_BASIS.

19 years agoDocument an alternate way to achieve the effect of this script
Wayne Davison [Tue, 22 Feb 2005 21:24:24 +0000 (21:24 +0000)]
Document an alternate way to achieve the effect of this script
through the use of awk and the more powerful --filter option.

19 years agoWhen preforming a recursive delete, push/pop the per-dir merge rules.
Wayne Davison [Tue, 22 Feb 2005 20:42:55 +0000 (20:42 +0000)]
When preforming a recursive delete, push/pop the per-dir merge rules.

19 years agoSort the dir-list returned by get_dirlist() and the dir-list that
Wayne Davison [Tue, 22 Feb 2005 03:37:18 +0000 (03:37 +0000)]
Sort the dir-list returned by get_dirlist() and the dir-list that
delete_in_dir() generates.

19 years ago- Iterate through the deletion list in reverse order so that we
Wayne Davison [Tue, 22 Feb 2005 03:16:41 +0000 (03:16 +0000)]
- Iterate through the deletion list in reverse order so that we
  can't delete a backup file that we just created.
- The rename-directory-for-backup heuristic now checks the
  DEL_FORCE_RECURSE flag, not the zap_dir variable.  We also set
  the flag when we recurse so that only the root dir of a deleted
  hierarchy can be missing the flag (and thus be a call from the
  generator).

19 years agoOnly rename a directory with the backup suffix if we're removing
Wayne Davison [Tue, 22 Feb 2005 01:59:15 +0000 (01:59 +0000)]
Only rename a directory with the backup suffix if we're removing
it to replace it with a file of the same name.

19 years agoIn make_simple_backup(), if the rename() failed because we tried
Wayne Davison [Tue, 22 Feb 2005 01:57:58 +0000 (01:57 +0000)]
In make_simple_backup(), if the rename() failed because we tried
to rename a directory over a file or visa versa, try to handle it.

19 years agoA couple changes in delete_file() make us more compatible with
Wayne Davison [Tue, 22 Feb 2005 00:42:12 +0000 (00:42 +0000)]
A couple changes in delete_file() make us more compatible with
older versions: (1) we no longer complain if excluded files
sticking around cause us to not be able to remove a subdir, and
(2) we output the name of the removed subdir after it has been
successfully removed.

19 years agoAdded function check for vasprintf.
Wayne Davison [Mon, 21 Feb 2005 18:58:09 +0000 (18:58 +0000)]
Added function check for vasprintf.