Skip to contentSkip to conversation

Btrfs-progs: make btrfsctl return values like everybody else

PATCH New Josef Bacik 1 participant 1 message Feb 2, 2010 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs-progs: make btrfsctl return values like everybody else

This patch makes btrfsctl return 0 for success and 1 for failure, which is the behavior of all other userspace applications. Thanks,

---
 btrfsctl.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
btrfsctl.c +2 -4
index 66c4e89..73d9c30 100644
@@ -231,9 +231,7 @@ int main(int ac, char **av)
 		printf("ioctl failed with error %d\n", ret);
 	}
 	printf("%s\n", BTRFS_BUILD_VERSION);
-	if (ret)
-		exit(0);
-	else
-		exit(1);
+
+	return ret ? 1 : 0;
 }
 
Signature · 1 line
1.6.6