]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add support for the HDIO_GET_IDENTITY ioctl based on patch
authorTom Hughes <tom@compton.nu>
Sat, 19 Jun 2004 12:12:01 +0000 (12:12 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 19 Jun 2004 12:12:01 +0000 (12:12 +0000)
from Jim McDonald <jim@mcdee.net>.

CCMAIL: 83340-done@bugs.kde.org

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2425

coregrind/vg_syscalls.c
coregrind/vg_unsafe.h

index 0e33c42cc43d988fd4b750ac4269b0817e3394c3..d6037bff769e8a006768ef6ea3dcc627d1fde2ee 100644 (file)
@@ -3325,6 +3325,12 @@ PRE(ioctl)
       break;
 #           endif /* BLKGETSIZE */
 
+      /* Hard disks */
+   case HDIO_GET_IDENTITY: /* 0x030d */
+      SYSCALL_TRACK( pre_mem_write,tid, "ioctl(HDIO_GET_IDENTITY)", arg3,
+                     sizeof(struct hd_driveid) );
+      break;
+
       /* CD ROM stuff (??)  */
    case CDROM_GET_MCN:
       SYSCALL_TRACK( pre_mem_read,tid, "ioctl(CDROM_GET_MCN)", arg3,
@@ -3780,6 +3786,12 @@ POST(ioctl)
       break;
 #           endif /* BLKGETSIZE */
 
+      /* Hard disks */
+   case HDIO_GET_IDENTITY: /* 0x030d */
+      if (res == 0)
+        VG_TRACK( post_mem_write,arg3, sizeof(struct hd_driveid));
+      break;
+
       /* CD ROM stuff (??)  */
    case CDROMSUBCHNL:
       if (res == 0)
index 3944a29189f77919570c88ba4cb704e917897752..6bcc8ab68747f5ff4686fd456d16110f53b1ad22 100644 (file)
@@ -63,6 +63,7 @@
 #include <linux/cdrom.h>  /* for cd-rom ioctls */
 #include <signal.h>       /* for siginfo_t */
 #include <linux/timex.h>  /* for adjtimex */
+#include <linux/hdreg.h>  /* for hard drive ioctls */
 #ifdef HAVE_LINUX_FB_H
 #include <linux/fb.h>     /* for fb_* structs */
 #endif