btrfs-progs: use symbolic name for subvolume inode number in test_issubvolume
authorDavid Sterba <dsterba@suse.com>
Wed, 13 Jan 2016 17:08:34 +0000 (18:08 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 14 Jan 2016 10:07:10 +0000 (11:07 +0100)
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-subvolume.c

index 6ff41e2..d4ef102 100644 (file)
@@ -238,7 +238,8 @@ int test_issubvolume(char *path)
        if(res < 0 )
                return -1;
 
-       return (st.st_ino == 256) && S_ISDIR(st.st_mode);
+       return (st.st_ino == BTRFS_FIRST_FREE_OBJECTID)
+               && S_ISDIR(st.st_mode);
 }
 
 static int wait_for_commit(int fd)