git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fuse/RHEL: Don't require UTIME_{NOW,OMIT} to be defined.
[libguestfs.git]
/
fuse
/
guestmount.c
diff --git
a/fuse/guestmount.c
b/fuse/guestmount.c
index
739d8cb
..
05cacef
100644
(file)
--- a/
fuse/guestmount.c
+++ b/
fuse/guestmount.c
@@
-427,7
+427,7
@@
fg_symlink (const char *from, const char *to)
dir_cache_invalidate (to);
dir_cache_invalidate (to);
- r = guestfs_ln_s (g,
to, from
);
+ r = guestfs_ln_s (g,
from, to
);
if (r == -1)
return error ();
if (r == -1)
return error ();
@@
-441,6
+441,7
@@
fg_rename (const char *from, const char *to)
if (read_only) return -EROFS;
if (read_only) return -EROFS;
+ dir_cache_invalidate (from);
dir_cache_invalidate (to);
/* XXX It's not clear how close the 'mv' command is to the
dir_cache_invalidate (to);
/* XXX It's not clear how close the 'mv' command is to the
@@
-461,9
+462,10
@@
fg_link (const char *from, const char *to)
if (read_only) return -EROFS;
if (read_only) return -EROFS;
+ dir_cache_invalidate (from);
dir_cache_invalidate (to);
dir_cache_invalidate (to);
- r = guestfs_ln (g,
to, from
);
+ r = guestfs_ln (g,
from, to
);
if (r == -1)
return error ();
if (r == -1)
return error ();
@@
-532,14
+534,22
@@
fg_utimens (const char *path, const struct timespec ts[2])
time_t mtsecs = ts[1].tv_sec;
long mtnsecs = ts[1].tv_nsec;
time_t mtsecs = ts[1].tv_sec;
long mtnsecs = ts[1].tv_nsec;
+#ifdef UTIME_NOW
if (atnsecs == UTIME_NOW)
atnsecs = -1;
if (atnsecs == UTIME_NOW)
atnsecs = -1;
+#endif
+#ifdef UTIME_OMIT
if (atnsecs == UTIME_OMIT)
atnsecs = -2;
if (atnsecs == UTIME_OMIT)
atnsecs = -2;
+#endif
+#ifdef UTIME_NOW
if (mtnsecs == UTIME_NOW)
mtnsecs = -1;
if (mtnsecs == UTIME_NOW)
mtnsecs = -1;
+#endif
+#ifdef UTIME_OMIT
if (mtnsecs == UTIME_OMIT)
mtnsecs = -2;
if (mtnsecs == UTIME_OMIT)
mtnsecs = -2;
+#endif
r = guestfs_utimens (g, path, atsecs, atnsecs, mtsecs, mtnsecs);
if (r == -1)
r = guestfs_utimens (g, path, atsecs, atnsecs, mtsecs, mtnsecs);
if (r == -1)