Univention Bugzilla – Attachment 2834 Details for
Bug 19890
Locking auf xfs-Dateisystem (wahrscheinlich) fehlerhaft
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
v3-5.try-other-methods-if-utimensat-is-not-supported-ret.patch
v3-5.try-other-methods-if-utimensat-is-not-supported-ret.patch (text/plain), 1.84 KB, created by
Janek Walkenhorst
on 2010-11-17 17:28:38 CET
(
hide
)
Description:
v3-5.try-other-methods-if-utimensat-is-not-supported-ret.patch
Filename:
MIME Type:
Creator:
Janek Walkenhorst
Created:
2010-11-17 17:28:38 CET
Size:
1.84 KB
patch
obsolete
>From c7c2a8fc3853cf5205e952ca94635a7f054efcce Mon Sep 17 00:00:00 2001 >From: Janek Walkenhorst <walkenhorst@univention.de> >Date: Wed, 17 Nov 2010 16:23:39 +0100 >Subject: [PATCH] try other methods if utimensat is not supported (returns ENOSYS) > >--- > source3/modules/vfs_default.c | 16 ++++++++++++++-- > 1 files changed, 14 insertions(+), 2 deletions(-) > >diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c >index 6e2a571..12b7907 100644 >--- a/source3/modules/vfs_default.c >+++ b/source3/modules/vfs_default.c >@@ -541,14 +541,19 @@ static int copy_reg(const char *source, const char *dest) > > /* Try to copy the old file's modtime and access time. */ > #if defined(HAVE_UTIMENSAT) >+ int result; > { > struct timespec ts[2]; > > ts[0] = source_stats.st_ex_atime; > ts[1] = source_stats.st_ex_mtime; >+ result = > utimensat(AT_FDCWD, dest, ts, AT_SYMLINK_NOFOLLOW); > } >-#elif defined(HAVE_UTIMES) >+ /* try other methods if utimensat is not supported */ >+ if (result == -1 && errno == ENOSYS) >+#endif >+#if defined(HAVE_UTIMES) > { > struct timeval tv[2]; > >@@ -568,6 +573,8 @@ static int copy_reg(const char *source, const char *dest) > tv.modtime = convert_timespec_to_time_t(source_stats.st_ex_mtime); > utime(dest, &tv); > } >+#else >+ {} > #endif > > if (unlink (source) == -1) >@@ -898,7 +905,11 @@ static int vfswrap_ntimes(vfs_handle_struct *handle, > } else { > result = utimensat(AT_FDCWD, smb_fname->base_name, NULL, 0); > } >-#elif defined(HAVE_UTIMES) >+ /* try other methods if utimensat is not supported */ >+ if (result == -1 && errno == ENOSYS) >+#endif >+{ >+#if defined(HAVE_UTIMES) > if (ft != NULL) { > struct timeval tv[2]; > tv[0] = convert_timespec_to_timeval(ft->atime); >@@ -920,6 +931,7 @@ static int vfswrap_ntimes(vfs_handle_struct *handle, > errno = ENOSYS; > result = -1; > #endif >+} > > out: > END_PROFILE(syscall_ntimes); >-- >1.5.6.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19890
:
2833
|
2834
|
2838