]> granicus.if.org Git - strace/commitdiff
2004-09-13 Dmitry V. Levin <ldv@altlinux.org>
authorRoland McGrath <roland@redhat.com>
Wed, 6 Oct 2004 22:31:38 +0000 (22:31 +0000)
committerRoland McGrath <roland@redhat.com>
Wed, 6 Oct 2004 22:31:38 +0000 (22:31 +0000)
* linux/ioctlsort.c (main): Omit duplicate lines
(with same name and code) from output.
* linux/ioctlent.sh: Build the list of ioctls defined in
scsi/sg.h (0x22..), scsi/scsi.h and scsi/scsi_ioctl.h (0x53..),
as suggested by Peter Jones <pjones@redhat.com>
* linux/ioctlent.h: Regenerated.
Fixes RH#129808.

linux/ioctlent.h
linux/ioctlent.sh
linux/ioctlsort.c

index c24e0eff551ff8ff90d8468ff6a514242ba59e69..57a20706977336d1a29129a2a54591febd8b1a9f 100644 (file)
        {"linux/fs.h",  "BLKBSZGET",    0x1270},
        {"linux/fs.h",  "BLKBSZSET",    0x1271},
        {"linux/fs.h",  "BLKGETSIZE64", 0x1272},
+       {"scsi/sg.h",   "SG_SET_TIMEOUT",       0x2201},
+       {"scsi/sg.h",   "SG_GET_TIMEOUT",       0x2202},
+       {"scsi/sg.h",   "SG_EMULATED_HOST",     0x2203},
+       {"scsi/sg.h",   "SG_SET_TRANSFORM",     0x2204},
+       {"scsi/sg.h",   "SG_GET_TRANSFORM",     0x2205},
+       {"scsi/sg.h",   "SG_GET_COMMAND_Q",     0x2270},
+       {"scsi/sg.h",   "SG_SET_COMMAND_Q",     0x2271},
+       {"scsi/sg.h",   "SG_GET_RESERVED_SIZE", 0x2272},
+       {"scsi/sg.h",   "SG_SET_RESERVED_SIZE", 0x2275},
+       {"scsi/sg.h",   "SG_GET_SCSI_ID",       0x2276},
+       {"scsi/sg.h",   "SG_SET_FORCE_LOW_DMA", 0x2279},
+       {"scsi/sg.h",   "SG_GET_LOW_DMA",       0x227a},
+       {"scsi/sg.h",   "SG_SET_FORCE_PACK_ID", 0x227b},
+       {"scsi/sg.h",   "SG_GET_PACK_ID",       0x227c},
+       {"scsi/sg.h",   "SG_GET_NUM_WAITING",   0x227d},
+       {"scsi/sg.h",   "SG_SET_DEBUG", 0x227e},
+       {"scsi/sg.h",   "SG_GET_SG_TABLESIZE",  0x227f},
+       {"scsi/sg.h",   "SG_GET_VERSION_NUM",   0x2282},
+       {"scsi/sg.h",   "SG_NEXT_CMD_LEN",      0x2283},
+       {"scsi/sg.h",   "SG_SCSI_RESET",        0x2284},
+       {"scsi/sg.h",   "SG_IO",        0x2285},
+       {"scsi/sg.h",   "SG_GET_REQUEST_TABLE", 0x2286},
+       {"scsi/sg.h",   "SG_SET_KEEP_ORPHAN",   0x2287},
+       {"scsi/sg.h",   "SG_GET_KEEP_ORPHAN",   0x2288},
+       {"scsi/sg.h",   "SG_GET_ACCESS_COUNT",  0x2289},
        {"linux/i2o.h", "BLKI2OGRSTRAT",        0x3201},
        {"linux/i2o.h", "BLKI2OGWSTRAT",        0x3202},
        {"linux/i2o.h", "BLKI2OSRSTRAT",        0x3203},
        {"sound/asequencer.h",  "SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT",      0x5352},
        {"sound/asequencer.h",  "SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC",       0x5353},
        {"sound/asequencer.h",  "SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC",       0x5354},
+       {"scsi/scsi_ioctl.h",   "SCSI_IOCTL_DOORLOCK",  0x5380},
+       {"scsi/scsi_ioctl.h",   "SCSI_IOCTL_DOORUNLOCK",        0x5381},
        {"linux/cdrom.h",       "CDROMAUDIOBUFSIZ",     0x5382},
+       {"scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0x5382},
+       {"scsi/scsi.h", "SCSI_IOCTL_TAGGED_ENABLE",     0x5383},
+       {"scsi/scsi.h", "SCSI_IOCTL_TAGGED_DISABLE",    0x5384},
+       {"scsi/scsi.h", "SCSI_IOCTL_PROBE_HOST",        0x5385},
+       {"scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER",    0x5386},
+       {"scsi/scsi.h", "SCSI_IOCTL_GET_PCI",   0x5387},
        {"linux/cdrom.h",       "DVD_READ_STRUCT",      0x5390},
        {"linux/cdrom.h",       "DVD_WRITE_STRUCT",     0x5391},
        {"linux/cdrom.h",       "DVD_AUTH",     0x5392},
index 2da3618d9dc05a220f893df1a8f0ab4c7bd50a8f..1242ff0eece09155a9d6bdd0b9e72249cb167d95 100644 (file)
@@ -58,9 +58,10 @@ s/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*\
 }
 
 : > ioctls.h
+lookup_ioctls 22 scsi/sg.h
 lookup_ioctls 46 linux/fb.h
 lookup_ioctls 4B linux/kd.h
-lookup_ioctls 53 linux/cdrom.h
+lookup_ioctls 53 linux/cdrom.h scsi/scsi.h scsi/scsi_ioctl.h
 lookup_ioctls 54 $asm/ioctls.h
 lookup_ioctls 56 linux/vt.h
 lookup_ioctls '7[12]' linux/videotext.h
index fcccf38a43bce7040f6795d5a416f8f10e9b6b30..f544d843bf419a124cd78343a8d450f3c0657aaa 100644 (file)
@@ -43,8 +43,10 @@ int main(int argc, char** argv) {
        qsort(ioctls, nioctls, sizeof(ioctls[0]), compare);
        puts ("\t/* Generated by ioctlsort */");
        for (i = 0; i < nioctls; i++)
-               printf("\t{\"%s\",\t\"%s\",\t%#lx},\n",
-                       ioctls[i].header, ioctls[i].name, ioctls[i].code);
+               if (i == 0 || ioctls[i].code != ioctls[i-1].code ||
+                   strcmp (ioctls[i].name, ioctls[i-1].name))
+                       printf("\t{\"%s\",\t\"%s\",\t%#lx},\n",
+                               ioctls[i].header, ioctls[i].name, ioctls[i].code);
 
        return 0;
 }