• Ka-Hing Cheung's avatar
    fix getxattr and listxattr (#72) · e7bcad20
    Ka-Hing Cheung authored
    previously, this will fail if /mnt/file doesn't have an xattr:
    
    ```
    listxattr("/mnt/file", 0x7fe8b3686830, 256) = -1 EIO (Input/output error)
    ```
    
    We should be returning the actual size only if the input size is
    zero. Related issue is if the filesystem returns ERANGE, we should
    propagate that error instead of returning the actual size.
    
    Replaced go-xattr usage with x/sys/unix so we can test this.
    e7bcad20
memfs_test.go 46.3 KB