OSDN Git Service

Logged more details when an attribute is not found
authorJean-Pierre André <jpandre@users.sourceforge.net>
Fri, 20 Sep 2013 14:20:02 +0000 (16:20 +0200)
committerJean-Pierre André <jpandre@users.sourceforge.net>
Fri, 20 Sep 2013 14:20:02 +0000 (16:20 +0200)
Log the inode number and attribute type when an attribute is not found.
This simplifies identifying relevant ones among such log messages.

libntfs-3g/attrib.c

index 269ccf8..3df3a96 100644 (file)
@@ -6588,7 +6588,8 @@ void *ntfs_attr_readall(ntfs_inode *ni, const ATTR_TYPES type,
        
        na = ntfs_attr_open(ni, type, name, name_len);
        if (!na) {
-               ntfs_log_perror("ntfs_attr_open failed");
+               ntfs_log_perror("ntfs_attr_open failed, inode %lld attr 0x%lx",
+                               (long long)ni->mft_no,(long)le32_to_cpu(type));
                goto err_exit;
        }
        data = ntfs_malloc(na->data_size);