mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
Removed unused argument from ntfs_make_symlink()
Now that the size of the reparse point attribute is no longer used by the FUSE drivers to populate st_size for symlinks and junctions, it no longer needs to be returned by ntfs_make_symlink(). (contributed by Eric Biggers)
This commit is contained in:
parent
051a4b556b
commit
35cb222233
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user