2
Copyright (C) 2003-2006 MySQL AB
3
All rights reserved. Use is subject to license terms.
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; version 2 of the License.
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 the
12
GNU General Public License for more details.
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 St, Fifth Floor, Boston, MA 02110-1301 USA
21
#include <signaldata/FsReadWriteReq.hpp>
24
printFSREADWRITEREQ(FILE * output, const Uint32 * theData,
25
Uint32 len, Uint16 receiverBlockNo){
29
const FsReadWriteReq * const sig = (FsReadWriteReq *) theData;
31
fprintf(output, " UserPointer: %d\n", sig->userPointer);
32
fprintf(output, " FilePointer: %d\n", sig->filePointer);
33
fprintf(output, " UserReference: H\'%.8x", sig->userReference);
35
fprintf(output, " Operation flag: H\'%.8x (", sig->operationFlag);
36
if (sig->getSyncFlag(sig->operationFlag))
37
fprintf(output, "Sync,");
39
fprintf(output, "No sync,");
41
fprintf(output, " Format=");
42
switch(sig->getFormatFlag(sig->operationFlag)){
43
case FsReadWriteReq::fsFormatListOfPairs:
44
fprintf(output, "List of pairs)\n");
46
case FsReadWriteReq::fsFormatArrayOfPages:
47
fprintf(output, "Array of pages)\n");
49
case FsReadWriteReq::fsFormatListOfMemPages:
50
fprintf(output, "List of mem pages)\n");
52
case FsReadWriteReq::fsFormatGlobalPage:
53
fprintf(output, "List of global pages)\n");
54
case FsReadWriteReq::fsFormatSharedPage:
55
fprintf(output, "List of shared pages)\n");
58
fprintf(output, "fsFormatMax not handled\n");
63
fprintf(output, " varIndex: %d\n",
65
fprintf(output, " numberOfPages: %d\n",
67
fprintf(output, " pageData: ");
70
switch(sig->getFormatFlag(sig->operationFlag)){
71
case FsReadWriteReq::fsFormatListOfPairs:
72
for (i= 0; i < sig->numberOfPages*2; i += 2){
73
fprintf(output, " H\'%.8x, H\'%.8x\n", sig->data.pageData[i],
74
sig->data.pageData[i + 1]);
77
case FsReadWriteReq::fsFormatArrayOfPages:
78
fprintf(output, " H\'%.8x, H\'%.8x\n", sig->data.pageData[0],
79
sig->data.pageData[1]);
81
case FsReadWriteReq::fsFormatListOfMemPages:
82
for (i= 0; i < (sig->numberOfPages + 1); i++){
83
fprintf(output, " H\'%.8x, ", sig->data.pageData[i]);
86
case FsReadWriteReq::fsFormatGlobalPage:
87
for (i= 0; i < sig->numberOfPages; i++){
88
fprintf(output, " H\'%.8x, ", sig->data.pageData[i]);
92
fprintf(output, "Impossible event\n");
95
fprintf(output, "\n");