Skip to content

Commit

Permalink
utilities: suppress xfs_info stderr
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cebtenzzre committed Jun 20, 2023
1 parent c4b4662 commit 25227ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 25227ae

Please sign in to comment.