aboutsummaryrefslogtreecommitdiffstats
path: root/utils.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-12-19 15:31:00 +0100
committerDavid Sterba <dsterba@suse.cz>2014-12-19 15:31:00 +0100
commit3f22699030464fd69e108b3bd8373cf634bacb77 (patch)
tree4cc6cd5646aad62e7940cc559747aa41a9d37c5a /utils.h
parent0e4e1b1ed92bb687bd5a7decc3b54118b6cf401b (diff)
downloadbtrfs-progs-3f22699030464fd69e108b3bd8373cf634bacb77.tar.gz
btrfs-progs-3f22699030464fd69e108b3bd8373cf634bacb77.tar.xz
btrfs-progs-3f22699030464fd69e108b3bd8373cf634bacb77.zip
btrfs-progs: move contents of math.h to utils.h and delete
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 34fd5e4..2480a21 100644
--- a/utils.h
+++ b/utils.h
@@ -190,6 +190,15 @@ static inline int count_digits(u64 num)
return ret;
}
+static inline u64 div_factor(u64 num, int factor)
+{
+ if (factor == 10)
+ return num;
+ num *= factor;
+ num /= 10;
+ return num;
+}
+
int btrfs_tree_search2_ioctl_supported(int fd);
#endif