diff --git a/include/ntfs-3g/reparse.h b/include/ntfs-3g/reparse.h index 27e90509..76af9150 100644 --- a/include/ntfs-3g/reparse.h +++ b/include/ntfs-3g/reparse.h @@ -24,8 +24,8 @@ #ifndef REPARSE_H #define REPARSE_H -char *ntfs_make_symlink(ntfs_inode *ni, const char *mnt_point, - int *pattr_size); +char *ntfs_make_symlink(ntfs_inode *ni, const char *mnt_point); + BOOL ntfs_possible_symlink(ntfs_inode *ni); int ntfs_get_ntfs_reparse_data(ntfs_inode *ni, char *value, size_t size); diff --git a/libntfs-3g/reparse.c b/libntfs-3g/reparse.c index b0f96ae5..2e92fbb6 100644 --- a/libntfs-3g/reparse.c +++ b/libntfs-3g/reparse.c @@ -724,8 +724,7 @@ static char *ntfs_get_rellink(ntfs_inode *ni, ntfschar *junction, int count) * symbolic link or directory junction */ -char *ntfs_make_symlink(ntfs_inode *ni, const char *mnt_point, - int *pattr_size) +char *ntfs_make_symlink(ntfs_inode *ni, const char *mnt_point) { s64 attr_size = 0; char *target; @@ -820,7 +819,6 @@ char *ntfs_make_symlink(ntfs_inode *ni, const char *mnt_point, } free(reparse_attr); } - *pattr_size = attr_size; if (bad) errno = EOPNOTSUPP; return (target); diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index c8d590d9..971b3a15 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -634,11 +634,10 @@ static int junction_getstat(ntfs_inode *ni, struct stat *stbuf) { char *target; - int attr_size; int res; errno = 0; - target = ntfs_make_symlink(ni, ctx->abs_mnt_point, &attr_size); + target = ntfs_make_symlink(ni, ctx->abs_mnt_point); /* * If the reparse point is not a valid * directory junction, and there is no error @@ -713,11 +712,9 @@ static int ntfs_fuse_getstat(struct SECURITY_CONTEXT *scx, goto ok; #else /* DISABLE_PLUGINS */ char *target; - int attr_size; errno = 0; - target = ntfs_make_symlink(ni, ctx->abs_mnt_point, - &attr_size); + target = ntfs_make_symlink(ni, ctx->abs_mnt_point); /* * If the reparse point is not a valid * directory junction, and there is no error @@ -1020,12 +1017,11 @@ static int junction_readlink(ntfs_inode *ni, const REPARSE_POINT *reparse __attribute__((unused)), char **pbuf) { - int attr_size; int res; errno = 0; res = 0; - *pbuf = ntfs_make_symlink(ni, ctx->abs_mnt_point, &attr_size); + *pbuf = ntfs_make_symlink(ni, ctx->abs_mnt_point); if (!*pbuf) { if (errno == EOPNOTSUPP) { *pbuf = strdup(ntfs_bad_reparse); @@ -1068,11 +1064,9 @@ static void ntfs_fuse_readlink(fuse_req_t req, fuse_ino_t ino) res = -errno; } #else /* DISABLE_PLUGINS */ - int attr_size; - errno = 0; res = 0; - buf = ntfs_make_symlink(ni, ctx->abs_mnt_point, &attr_size); + buf = ntfs_make_symlink(ni, ctx->abs_mnt_point); if (!buf) { if (errno == EOPNOTSUPP) buf = strdup(ntfs_bad_reparse); diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index a0e28705..21528c3b 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -698,11 +698,10 @@ static int junction_getattr(ntfs_inode *ni, struct stat *stbuf) { char *target; - int attr_size; int res; errno = 0; - target = ntfs_make_symlink(ni, ctx->abs_mnt_point, &attr_size); + target = ntfs_make_symlink(ni, ctx->abs_mnt_point); /* * If the reparse point is not a valid * directory junction, and there is no error @@ -805,10 +804,9 @@ static int ntfs_fuse_getattr(const char *org_path, struct stat *stbuf) goto exit; #else /* DISABLE_PLUGINS */ char *target; - int attr_size; errno = 0; - target = ntfs_make_symlink(ni, ctx->abs_mnt_point, &attr_size); + target = ntfs_make_symlink(ni, ctx->abs_mnt_point); /* * If the reparse point is not a valid * directory junction, and there is no error @@ -1038,12 +1036,11 @@ static int junction_readlink(ntfs_inode *ni, const REPARSE_POINT *reparse __attribute__((unused)), char **pbuf) { - int attr_size; int res; errno = 0; res = 0; - *pbuf = ntfs_make_symlink(ni, ctx->abs_mnt_point, &attr_size); + *pbuf = ntfs_make_symlink(ni, ctx->abs_mnt_point); if (!*pbuf) { if (errno == EOPNOTSUPP) { *pbuf = strdup(ntfs_bad_reparse); @@ -1099,11 +1096,10 @@ static int ntfs_fuse_readlink(const char *org_path, char *buf, size_t buf_size) } #else /* DISABLE_PLUGINS */ char *target; - int attr_size; errno = 0; res = 0; - target = ntfs_make_symlink(ni, ctx->abs_mnt_point, &attr_size); + target = ntfs_make_symlink(ni, ctx->abs_mnt_point); if (target) { strncpy(buf,target,buf_size); free(target);