import sys, stat, errno
from bup import metadata, options, xstat
from bup.helpers import handle_ctrl_c, saved_errors, add_error, log
-from bup import _helpers
def fstimestr(fstime):
if 'group' in active_fields:
print 'group:', m.group
if 'atime' in active_fields:
- # if we don't have_ns_fs_timestamps, that means we have to use
+ # If we don't have utimensat, that means we have to use
# utime(), and utime() has no way to set the mtime/atime of a
- # symlink. Thus, the mtime/atime of a symlink is meaningless, so
- # let's not report it. (That way scripts comparing before/after
- # won't trigger.)
- if _helpers._have_ns_fs_timestamps or not stat.S_ISLNK(m.mode):
+ # symlink. Thus, the mtime/atime of a symlink is meaningless,
+ # so let's not report it. (That way scripts comparing
+ # before/after won't trigger.)
+ if xstat._have_utimensat or not stat.S_ISLNK(m.mode):
print 'atime: ' + fstimestr(m.atime)
else:
print 'atime: 0'
if 'mtime' in active_fields:
- if _helpers._have_ns_fs_timestamps or not stat.S_ISLNK(m.mode):
+ if xstat._have_utimensat or not stat.S_ISLNK(m.mode):
print 'mtime: ' + fstimestr(m.mtime)
else:
print 'mtime: 0'