1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
diff -urN ../valgrind-2.4.0/coregrind/vg_syscalls.c valgrind-2.4.0/coregrind/vg_syscalls.c
--- ../valgrind-2.4.0/coregrind/vg_syscalls.c 2005-03-23 03:22:03.000000000 -0700
+++ valgrind-2.4.0/coregrind/vg_syscalls.c 2005-07-22 03:42:01.000000000 -0600
@@ -3266,15 +3266,34 @@
SYS_PRE_MEM_WRITE( "ioctl(RTC_IRQP_READ)", arg3, sizeof(unsigned long));
break;
+ case VKI_BLKRRPART:
+ case VKI_BLKFLSBUF:
+ break;
case VKI_BLKGETSIZE:
SYS_PRE_MEM_WRITE( "ioctl(BLKGETSIZE)", arg3, sizeof(unsigned long));
break;
+ case VKI_BLKGETSIZE64:
+ SYS_PRE_MEM_WRITE( "ioctl(BLKGETSIZE64)", arg3, sizeof(__vki_u64));
+ break;
+ case VKI_BLKSSZGET:
+ SYS_PRE_MEM_WRITE( "ioctl(BLKSSZGET)", arg3, sizeof(unsigned long));
+ break;
+ case VKI_BLKBSZGET:
+ SYS_PRE_MEM_WRITE( "ioctl(BLKBSZGET)", arg3, sizeof(unsigned long));
+ break;
+ case VKI_BLKBSZSET:
+ SYS_PRE_MEM_READ( "ioctl(BLKBSZSET)", arg3, sizeof(unsigned long) );
+ break;
/* Hard disks */
case VKI_HDIO_GET_IDENTITY: /* 0x030d */
SYS_PRE_MEM_WRITE( "ioctl(HDIO_GET_IDENTITY)", arg3,
VKI_SIZEOF_STRUCT_HD_DRIVEID );
break;
+ case VKI_HDIO_GETGEO: /* 0x0301 */
+ SYS_PRE_MEM_WRITE( "ioctl(HDIO_GETGEO)", arg3,
+ sizeof(struct vki_hd_geometry) );
+ break;
/* CD ROM stuff (??) */
case VKI_CDROM_GET_MCN:
@@ -3332,6 +3351,7 @@
break;
/* The following two are probably bogus (should check args
for readability). JRS 20021117 */
+ case VKI_CDROMEJECT:
case VKI_CDROM_DRIVE_STATUS: /* 0x5326 */
case VKI_CDROM_CLEAR_OPTIONS: /* 0x5321 */
break;
@@ -3931,14 +3951,31 @@
VG_TRACK( post_mem_write,arg3, sizeof(unsigned long));
break;
+ case VKI_BLKRRPART:
+ case VKI_BLKFLSBUF:
+ break;
case VKI_BLKGETSIZE:
VG_TRACK( post_mem_write,arg3, sizeof(unsigned long));
break;
+ case VKI_BLKGETSIZE64:
+ VG_TRACK( post_mem_write,arg3, sizeof(__vki_u64));
+ break;
+ case VKI_BLKSSZGET:
+ VG_TRACK( post_mem_write,arg3, sizeof(unsigned long));
+ break;
+ case VKI_BLKBSZGET:
+ VG_TRACK( post_mem_write,arg3, sizeof(unsigned long));
+ break;
+ case VKI_BLKBSZSET:
+ break;
/* Hard disks */
case VKI_HDIO_GET_IDENTITY: /* 0x030d */
VG_TRACK( post_mem_write,arg3, VKI_SIZEOF_STRUCT_HD_DRIVEID );
break;
+ case VKI_HDIO_GETGEO: /* 0x0301 */
+ VG_TRACK( post_mem_write,arg3, sizeof(struct vki_hd_geometry) );
+ break;
/* CD ROM stuff (??) */
case VKI_CDROMSUBCHNL:
@@ -3967,6 +4004,7 @@
break;
/* The following two are probably bogus (should check args
for readability). JRS 20021117 */
+ case VKI_CDROMEJECT:
case VKI_CDROM_DRIVE_STATUS: /* 0x5326 */
case VKI_CDROM_CLEAR_OPTIONS: /* 0x5321 */
break;
diff -urN ../valgrind-2.4.0/include/linux/vki.h valgrind-2.4.0/include/linux/vki.h
--- ../valgrind-2.4.0/include/linux/vki.h 2005-03-10 23:28:14.000000000 -0700
+++ valgrind-2.4.0/include/linux/vki.h 2005-07-22 03:42:01.000000000 -0600
@@ -1389,7 +1389,14 @@
// From linux-2.6.8.1/include/linux/fs.h
//----------------------------------------------------------------------
-#define VKI_BLKGETSIZE _VKI_IO(0x12,96) /* return device size /512 (long *arg) */
+#define VKI_BLKGETSIZE _VKI_IO(0x12, 96) /* return device size /512 (long *arg) */
+#define VKI_BLKGETSIZE64 _VKI_IOR(0x12, 114, __vki_u64) /* return device size in bytes (u64 *arg) */
+#define VKI_BLKRRPART _VKI_IO(0x12, 95) /* re-read partition table */
+#define VKI_BLKFLSBUF _VKI_IO(0x12, 97) /* flush buffer cache */
+#define VKI_BLKSSZGET _VKI_IO(0x12, 104)/* get block device sector size */
+#define VKI_BLKBSZGET _VKI_IOR(0x12, 112, unsigned long)
+#define VKI_BLKBSZSET _VKI_IOW(0x12, 113, unsigned long)
+
#define VKI_FIBMAP _VKI_IO(0x00,1) /* bmap access */
#define VKI_FIGETBSZ _VKI_IO(0x00,2) /* get the block size used for bmap */
@@ -1464,6 +1471,7 @@
(struct cdrom_tochdr) */
#define VKI_CDROMREADTOCENTRY 0x5306 /* Read TOC entry
(struct cdrom_tocentry) */
+#define VKI_CDROMEJECT 0x5309 /* Ejects the cdrom media */
#define VKI_CDROMSUBCHNL 0x530b /* Read subchannel data
(struct cdrom_subchnl) */
#define VKI_CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes)
@@ -1674,12 +1682,20 @@
// From linux-2.6.8.1/include/linux/hdreg.h
//----------------------------------------------------------------------
+#define VKI_HDIO_GETGEO 0x0301 /* get device geometry */
#define VKI_HDIO_GET_IDENTITY 0x030d /* get IDE identification info */
// [[Nb: done like this because the original type is a huge struct that will
// always be the same size.]]
#define VKI_SIZEOF_STRUCT_HD_DRIVEID 512
+struct vki_hd_geometry {
+ unsigned char heads;
+ unsigned char sectors;
+ unsigned short cylinders;
+ unsigned long start;
+};
+
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/linux/fb.h
//----------------------------------------------------------------------
|