#include <atalk/errchk.h>
#include <atalk/bstrlib.h>
#include <atalk/bstradd.h>
+#include <atalk/compat.h>
struct perm {
uid_t uid;
static int RF_chown_adouble(VFS_FUNC_ARGS_CHOWN)
{
struct stat st;
- char *ad_p;
+ const char *ad_p;
ad_p = vol->ad_path(path, ADFLAGS_HF );
/* ----------------- */
static int RF_setdirunixmode_adouble(VFS_FUNC_ARGS_SETDIRUNIXMODE)
{
- char *adouble = vol->ad_path(name, ADFLAGS_DIR );
+ const char *adouble = vol->ad_path(name, ADFLAGS_DIR );
int dropbox = vol->v_flags;
if (dir_rx_set(mode)) {
{
int dropbox = vol->v_flags;
mode_t hf_mode = ad_hf_mode(mode);
- char *adouble = vol->ad_path(name, ADFLAGS_DIR );
- char *adouble_p = ad_dir(adouble);
+ const char *adouble = vol->ad_path(name, ADFLAGS_DIR );
+ const char *adouble_p = ad_dir(adouble);
if (dir_rx_set(mode)) {
if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox, vol->v_umask) < 0)
* create .AppleDouble if the file is already opened, so we
* use a diff one, it's not a pb,ie it's not the same file, yet.
*/
- ad_init(&ad, vol->v_adouble, vol->v_ad_options);
- if (!ad_open(dst, ADFLAGS_HF, O_RDWR | O_CREAT, 0666, &ad)) {
+ ad_init(&ad, vol);
+ if (ad_open(&ad, dst, ADFLAGS_HF | ADFLAGS_RDWR | ADFLAGS_CREATE, 0666) == 0) {
ad_close(&ad, ADFLAGS_HF);
if (!unix_rename(dirfd, adsrc, -1, vol->ad_path(dst, 0 )) )
err = 0;