~ubuntu-branches/ubuntu/gutsy/amsn/gutsy

« back to all changes in this revision

Viewing changes to utils/linux/capture/structs/ioctl2desc

  • Committer: Bazaar Package Importer
  • Author(s): Theodore Karkoulis
  • Date: 2006-01-04 15:26:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060104152602-ipe1yg00rl3nlklv
Tags: 0.95-1
New Upstream Release (closes: #345052, #278575).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
use strict;
 
3
 
 
4
my ($name,$type);
 
5
 
 
6
while (<>) {
 
7
        ($name,$type) = m/\#define\s+(\w+)\s+_IO\w+\s*\([^,]+,\s*\d+,\s*(.*?)\)/
 
8
          or next;
 
9
 
 
10
        $type =~ s/struct /desc_/;
 
11
 
 
12
        print "[_IOC_NR($name)] = {\n";
 
13
        print "\t.name = \"$name\",\n";
 
14
        print "\t.desc = $type,\n";
 
15
        print "},\n";
 
16
}