1 /* 2 * Copyright (c) Cyril Hrubis chrubis (at) suse.cz 2009 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 12 * the GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19 /* 20 * This small library was created in order to put all code that's duplicated in 21 * ftestXX.c files here. 22 */ 23 24 #ifndef __LIBFTEST_H__ 25 #define __LIBFTEST_H__ 26 27 struct iovec; 28 29 /* 30 * Dump content of iov structure. 31 */ 32 void ft_dumpiov(struct iovec *iov); 33 34 /* 35 * Dump bits string. 36 */ 37 void ft_dumpbits(void *bits, size_t size); 38 39 /* 40 * Do logical or of hold and bits (of size) 41 * fields and store result into hold field. 42 */ 43 void ft_orbits(char *hold, char *bits, int size); 44 45 /* 46 * Dumps buffer in hexadecimal format. 47 */ 48 void ft_dumpbuf(char *buf, int csize); 49 50 /* 51 * Creates filename from path and numbers. 52 */ 53 void ft_mkname(char *name, char *dirname, int me, int idx); 54 55 #endif /* __LIBFTEST_H__ */ 56