Signed-off-by: Anand Jain <[email protected]>
---
 btrfs-convert.c | 10 +++++++++-
 mkfs.c          |  8 +++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/btrfs-convert.c b/btrfs-convert.c
index 52ea12a..b0a998b 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -2898,14 +2898,22 @@ int main(int argc, char *argv[])
        char fslabel[BTRFS_LABEL_SIZE];
        u64 features;
 
-       if (btrfs_features_allowed_by_sysfs(&features))
+       if (btrfs_features_allowed_by_sysfs(&features)) {
+               fprintf(stderr,
+               "Warning: Failed/Unsupported to obtain feature list from 
sysfs\n");
+
                features = btrfs_features_allowed_by_kernel();
+               if (!features)
+                       fprintf(stderr,
+               "Warning: Failed/Unsupported to get running kernel version\n");
+       }
 
        if (features)
                features &= BTRFS_MKFS_DEFAULT_FEATURES;
        else
                features = BTRFS_MKFS_DEFAULT_FEATURES;
 
+
        while(1) {
                enum { GETOPT_VAL_NO_PROGRESS = 256 };
                static const struct option long_options[] = {
diff --git a/mkfs.c b/mkfs.c
index 4f46ad9..6cb998b 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1367,8 +1367,14 @@ int main(int ac, char **av)
         * fails then default to the progs default, which is set as per
         * BTRFS_MKFS_DEFAULT_FEATURES
         */
-       if (btrfs_features_allowed_by_sysfs(&features))
+       if (btrfs_features_allowed_by_sysfs(&features)) {
+               fprintf(stderr,
+               "Warning: Failed/Unsupported to obtain feature list from 
sysfs\n");
                features = btrfs_features_allowed_by_kernel();
+               if (!features)
+                       fprintf(stderr,
+               "Warning: Failed/Unsupported to get running kernel version\n");
+       }
 
        if (features)
                features &= BTRFS_MKFS_DEFAULT_FEATURES;
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to