]> git.michaelhowe.org Git - packages/b/bup.git/commitdiff
Handle EOPNOTSUPP as an indicator that Linux attrs are not supported.
authorRob Browning <rlb@defaultvalue.org>
Sat, 5 Oct 2013 18:01:37 +0000 (13:01 -0500)
committerRob Browning <rlb@defaultvalue.org>
Mon, 7 Oct 2013 01:03:00 +0000 (20:03 -0500)
Add EOPNOTSUPP to the set of errno values in _add_linux_attr() that
indicate Linux attrs are not supported by the target filesystem.  The
problem was observed on ZFS-on-Linux, 0.6.2.

Thanks to Will Rouesnel <w.rouesnel@gmail.com> for the report and an
initial patch.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/metadata.py

index c851525c108642181d83ad2b8b88e653fe8df796..d1806b5ebf9f5bca61f940bcd9c3a105ee7201f0 100644 (file)
@@ -550,9 +550,7 @@ class Metadata:
             except OSError, e:
                 if e.errno == errno.EACCES:
                     add_error('read Linux attr: %s' % e)
-                elif e.errno == errno.ENOTTY or e.errno == errno.ENOSYS:
-                    # ENOTTY: Function not implemented.
-                    # ENOSYS: Inappropriate ioctl for device.
+                elif e.errno in (errno.ENOTTY, errno.ENOSYS, errno.EOPNOTSUPP):
                     # Assume filesystem doesn't support attrs.
                     return
                 else: