From 25227aefbb661bdc6e14dda7793b6bee11eb0821 Mon Sep 17 00:00:00 2001 From: Cebtenzzre Date: Wed, 31 Aug 2022 21:09:04 -0400 Subject: [PATCH] utilities: suppress xfs_info stderr xfs_info may complain about permission issues or filesystems that are no longer mounted, but that's not something that matters to the user - we're just checking for reflink support. Fixes #519 --- lib/utilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utilities.c b/lib/utilities.c index e22f616a..d59dd2f0 100644 --- a/lib/utilities.c +++ b/lib/utilities.c @@ -588,7 +588,7 @@ static bool fs_supports_reflinks(char *fstype, char *mountpoint) { } if(strcmp(fstype, "xfs")==0) { /* xfs *might* support reflinks...*/ - char *cmd = g_strdup_printf("xfs_info '%s' | grep -q 'reflink=1'", mountpoint); + char *cmd = g_strdup_printf("xfs_info '%s' 2>/dev/null | grep -q 'reflink=1'", mountpoint); int res = system(cmd); g_free(cmd); return(res==0);