From f5baaf48e3e82b1caf9f5cd1207d4d6feba3a2e5 Mon Sep 17 00:00:00 2001 From: Thomas Bertschinger Date: Mon, 15 Jan 2024 23:41:02 -0700 Subject: move Rust sources to top level, C sources into c_src This moves the Rust sources out of rust_src/ and into the top level. Running the bcachefs executable out of the development tree is now: $ ./target/release/bcachefs command or $ cargo run --profile release -- command instead of "./bcachefs command". Building and installing is still: $ make && make install Signed-off-by: Thomas Bertschinger Signed-off-by: Kent Overstreet --- raid/combo.h | 155 ----------------------------------------------------------- 1 file changed, 155 deletions(-) delete mode 100644 raid/combo.h (limited to 'raid/combo.h') diff --git a/raid/combo.h b/raid/combo.h deleted file mode 100644 index 8efc31ad..00000000 --- a/raid/combo.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (C) 2013 Andrea Mazzoleni - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef __RAID_COMBO_H -#define __RAID_COMBO_H - -#include - -/** - * Get the first permutation with repetition of r of n elements. - * - * Typical use is with permutation_next() in the form : - * - * int i[R]; - * permutation_first(R, N, i); - * do { - * code using i[0], i[1], ..., i[R-1] - * } while (permutation_next(R, N, i)); - * - * It's equivalent at the code : - * - * for(i[0]=0;i[0]= n) { - - /* if we are at the first level, we have finished */ - if (i == 0) - return 0; - - /* increase the previous position */ - --i; - goto recurse; - } - - ++i; - - /* initialize all the next positions, if any */ - while (i < r) { - c[i] = 0; - ++i; - } - - return 1; -} - -/** - * Get the first combination without repetition of r of n elements. - * - * Typical use is with combination_next() in the form : - * - * int i[R]; - * combination_first(R, N, i); - * do { - * code using i[0], i[1], ..., i[R-1] - * } while (combination_next(R, N, i)); - * - * It's equivalent at the code : - * - * for(i[0]=0;i[0]= h) { - - /* if we are at the first level, we have finished */ - if (i == 0) - return 0; - - /* increase the previous position */ - --i; - --h; - goto recurse; - } - - ++i; - - /* initialize all the next positions, if any */ - while (i < r) { - /* each position start at the next value of the previous one */ - c[i] = c[i - 1] + 1; - ++i; - } - - return 1; -} -#endif - -- cgit v1.2.3