1
/* Copyright (C) 2003 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
18
#include <signaldata/FsReadWriteReq.hpp>
21
printFSREADWRITEREQ(FILE * output, const Uint32 * theData,
22
Uint32 len, Uint16 receiverBlockNo){
26
const FsReadWriteReq * const sig = (FsReadWriteReq *) theData;
28
fprintf(output, " UserPointer: %d\n", sig->userPointer);
29
fprintf(output, " FilePointer: %d\n", sig->filePointer);
30
fprintf(output, " UserReference: H\'%.8x", sig->userReference);
32
fprintf(output, " Operation flag: H\'%.8x (", sig->operationFlag);
33
if (sig->getSyncFlag(sig->operationFlag))
34
fprintf(output, "Sync,");
36
fprintf(output, "No sync,");
38
fprintf(output, " Format=");
39
switch(sig->getFormatFlag(sig->operationFlag)){
40
case FsReadWriteReq::fsFormatListOfPairs:
41
fprintf(output, "List of pairs)\n");
43
case FsReadWriteReq::fsFormatArrayOfPages:
44
fprintf(output, "Array of pages)\n");
46
case FsReadWriteReq::fsFormatListOfMemPages:
47
fprintf(output, "List of mem pages)\n");
49
case FsReadWriteReq::fsFormatGlobalPage:
50
fprintf(output, "List of global pages)\n");
51
case FsReadWriteReq::fsFormatSharedPage:
52
fprintf(output, "List of shared pages)\n");
55
fprintf(output, "fsFormatMax not handled\n");
60
fprintf(output, " varIndex: %d\n",
62
fprintf(output, " numberOfPages: %d\n",
64
fprintf(output, " pageData: ");
67
switch(sig->getFormatFlag(sig->operationFlag)){
68
case FsReadWriteReq::fsFormatListOfPairs:
69
for (i= 0; i < sig->numberOfPages*2; i += 2){
70
fprintf(output, " H\'%.8x, H\'%.8x\n", sig->data.pageData[i],
71
sig->data.pageData[i + 1]);
74
case FsReadWriteReq::fsFormatArrayOfPages:
75
fprintf(output, " H\'%.8x, H\'%.8x\n", sig->data.pageData[0],
76
sig->data.pageData[1]);
78
case FsReadWriteReq::fsFormatListOfMemPages:
79
for (i= 0; i < (sig->numberOfPages + 1); i++){
80
fprintf(output, " H\'%.8x, ", sig->data.pageData[i]);
83
case FsReadWriteReq::fsFormatGlobalPage:
84
for (i= 0; i < sig->numberOfPages; i++){
85
fprintf(output, " H\'%.8x, ", sig->data.pageData[i]);
89
fprintf(output, "Impossible event\n");
92
fprintf(output, "\n");