• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Disktest
3 * Copyright (c) International Business Machines Corp., 2001
4 *
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 *
20 *  Please send e-mail to yardleyb@us.ibm.com if you have
21 *  questions or comments.
22 *
23 *  Project Website:  TBD
24 *
25 * $Id: childmain.h,v 1.7 2008/03/24 10:33:53 subrata_modak Exp $
26 *
27 */
28 
29 #ifndef _CHILDMAIN_H
30 #define _CHILDMAIN_H 1
31 
32 #define SEEK_FAILURE	1
33 #define ACCESS_FAILURE	2
34 #define DATA_MISCOMPARE	3
35 
36 typedef enum mc_func {
37 	EXP,ACT,REREAD
38 } mc_func_t;
39 
40 #define DMOFFSTR "Thread %d: First miscompare at byte offset %zd (0x%zX)\n"
41 
42 #ifdef WINDOWS
43 #define DMSTR "Thread %d: Data miscompare at lba %I64d (0x%I64X)\n"
44 #define AFSTR "Thread %d: %s failed: seek %I64u, lba %I64u (0x%I64X), got = %ld, asked for = %ld, errno %lu\n"
45 #define SFSTR "Thread %d: seek failed seek %I64d, lba = %I64d, request pos = %I64d, seek pos = %I64d, errno %lu\n"
46 #define DMFILESTR "\n********** %s (Target: %s, LBA: %I64d, Offset: %d) **********\n"
47 DWORD WINAPI ChildMain(test_ll_t *);
48 #else
49 #define DMSTR "Thread %d: Data miscompare at lba %lld (0x%llX)\n"
50 #define AFSTR "Thread %d: %s failed: seek %llu, lba %lld (0x%llX), got = %ld, asked for = %ld, errno %lu\n"
51 #define SFSTR "Thread %d: seek failed seek %lld, lba = %lld, request pos = %lld, seek pos = %lld, errno %lu\n"
52 #define DMFILESTR "\n********** %s (Target: %s, LBA: %lld, Offset: %zd) **********\n"
53 void *ChildMain(void *);
54 #endif
55 
56 #endif /* _CHILDMAIN_H */
57 
58