mirror of
https://github.com/samba-team/samba.git
synced 2025-02-12 21:58:10 +03:00
libsmb: Remove unused setup_stat_from_stat_ex()
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
fba4e66df5
commit
debb589484
@ -530,9 +530,6 @@ void setup_stat(struct stat *st,
|
|||||||
struct timespec access_time_ts,
|
struct timespec access_time_ts,
|
||||||
struct timespec change_time_ts,
|
struct timespec change_time_ts,
|
||||||
struct timespec write_time_ts);
|
struct timespec write_time_ts);
|
||||||
void setup_stat_from_stat_ex(const struct stat_ex *stex,
|
|
||||||
const char *fname,
|
|
||||||
struct stat *st);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
SMBC_stat_ctx(SMBCCTX *context,
|
SMBC_stat_ctx(SMBCCTX *context,
|
||||||
|
@ -114,48 +114,6 @@ void setup_stat(struct stat *st,
|
|||||||
set_mtimensec(st, write_time_ts.tv_nsec);
|
set_mtimensec(st, write_time_ts.tv_nsec);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_stat_from_stat_ex(const struct stat_ex *stex,
|
|
||||||
const char *fname,
|
|
||||||
struct stat *st)
|
|
||||||
{
|
|
||||||
st->st_atime = stex->st_ex_atime.tv_sec;
|
|
||||||
set_atimensec(st, stex->st_ex_atime.tv_nsec);
|
|
||||||
|
|
||||||
st->st_ctime = stex->st_ex_ctime.tv_sec;
|
|
||||||
set_ctimensec(st, stex->st_ex_ctime.tv_nsec);
|
|
||||||
|
|
||||||
st->st_mtime = stex->st_ex_mtime.tv_sec;
|
|
||||||
set_mtimensec(st, stex->st_ex_mtime.tv_nsec);
|
|
||||||
|
|
||||||
st->st_mode = stex->st_ex_mode;
|
|
||||||
st->st_size = stex->st_ex_size;
|
|
||||||
#ifdef HAVE_STAT_ST_BLKSIZE
|
|
||||||
st->st_blksize = 512;
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_STAT_ST_BLOCKS
|
|
||||||
st->st_blocks = (st->st_size + 511) / 512;
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_STRUCT_STAT_ST_RDEV
|
|
||||||
st->st_rdev = 0;
|
|
||||||
#endif
|
|
||||||
st->st_uid = stex->st_ex_uid;
|
|
||||||
st->st_gid = stex->st_ex_gid;
|
|
||||||
|
|
||||||
st->st_nlink = stex->st_ex_nlink;
|
|
||||||
|
|
||||||
if (stex->st_ex_ino == 0) {
|
|
||||||
st->st_ino = 0;
|
|
||||||
if (fname != NULL) {
|
|
||||||
st->st_ino = generate_inode(fname);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
st->st_ino = stex->st_ex_ino;
|
|
||||||
}
|
|
||||||
|
|
||||||
st->st_dev = stex->st_ex_dev;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routine to stat a file given a name
|
* Routine to stat a file given a name
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user