From 168191d9bf02a01a3f336893f1eafc44c5077417 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 15 Sep 2014 13:49:48 +0200 Subject: vfs_fruit: ad_write: path may be NULL for rfork In preperation of the next commit where we want to call ad_write() on a resource fork without having a name, just an fsp, which is fine for resource forks. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Reviewed-by: Volker Lendecke --- source3/modules/vfs_fruit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 37027459f5..458904edc9 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -1114,7 +1114,9 @@ exit: * Set AppleDouble metadata on a file or directory * * @param[in] ad adouble handle - * @param[in] path pathname to file or directory + + * @param[in] path pathname to file or directory, may be NULL for a + * resource fork * * @return status code, 0 means success **/ @@ -1145,7 +1147,8 @@ static int ad_write(struct adouble *ad, const char *path) len = sys_pwrite(ad->ad_fsp->fh->fd, ad->ad_data, talloc_get_size(ad->ad_data), 0); if (len != talloc_get_size(ad->ad_data)) { - DEBUG(1, ("short write on %s: %zd", path, len)); + DEBUG(1, ("short write on %s: %zd", + fsp_str_dbg(ad->ad_fsp), len)); rc = -1; goto exit; } -- cgit