~ubuntu-branches/ubuntu/precise/udev/precise

« back to all changes in this revision

Viewing changes to debian/patches/debian-changes-172-0ubuntu4

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-07-25 16:53:47 UTC
  • Revision ID: james.westby@ubuntu.com-20110725165347-hsp9soukm9mnfkx3
Tags: 172-0ubuntu4
debian/udev.installer-startup: Create /dev/pts before mounting it
(LP: #815962).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Upstream changes introduced in version 172-0ubuntu4
 
2
 This patch has been created by dpkg-source during the package build.
 
3
 Here's the last changelog entry, hopefully it gives details on why
 
4
 those changes were made:
 
5
 .
 
6
 udev (172-0ubuntu4) oneiric; urgency=low
 
7
 .
 
8
   * debian/udev.installer-startup: Create /dev/pts before mounting it
 
9
     (LP: #815962).
 
10
 .
 
11
 The person named in the Author field signed this changelog entry.
 
12
Author: Colin Watson <cjwatson@ubuntu.com>
 
13
Bug-Ubuntu: https://bugs.launchpad.net/bugs/815962
 
14
 
 
15
---
 
16
The information above should follow the Patch Tagging Guidelines, please
 
17
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
 
18
are templates for supplementary fields that you might want to add:
 
19
 
 
20
Origin: <vendor|upstream|other>, <url of original patch>
 
21
Bug: <url in upstream bugtracker>
 
22
Bug-Debian: http://bugs.debian.org/<bugnumber>
 
23
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
 
24
Forwarded: <no|not-needed|url proving that it has been forwarded>
 
25
Reviewed-By: <name and email of someone who approved the patch>
 
26
Last-Update: <YYYY-MM-DD>
 
27
 
 
28
--- /dev/null
 
29
+++ udev-172/extras/gudev/gjs-example.js
 
30
@@ -0,0 +1,75 @@
 
31
+#!/usr/bin/env gjs-console
 
32
+
 
33
+// This currently depends on the following patches to gjs
 
34
+//
 
35
+// http://bugzilla.gnome.org/show_bug.cgi?id=584558
 
36
+// http://bugzilla.gnome.org/show_bug.cgi?id=584560
 
37
+// http://bugzilla.gnome.org/show_bug.cgi?id=584568
 
38
+
 
39
+const GUdev = imports.gi.GUdev;
 
40
+const Mainloop = imports.mainloop;
 
41
+
 
42
+function print_device (device) {
 
43
+  print ("  subsystem:             " + device.get_subsystem ());
 
44
+  print ("  devtype:               " + device.get_devtype ());
 
45
+  print ("  name:                  " + device.get_name ());
 
46
+  print ("  number:                " + device.get_number ());
 
47
+  print ("  sysfs_path:            " + device.get_sysfs_path ());
 
48
+  print ("  driver:                " + device.get_driver ());
 
49
+  print ("  action:                " + device.get_action ());
 
50
+  print ("  seqnum:                " + device.get_seqnum ());
 
51
+  print ("  device type:           " + device.get_device_type ());
 
52
+  print ("  device number:         " + device.get_device_number ());
 
53
+  print ("  device file:           " + device.get_device_file ());
 
54
+  print ("  device file symlinks:  " + device.get_device_file_symlinks ());
 
55
+  print ("  foo: " + device.get_sysfs_attr_as_strv ("stat"));
 
56
+  var keys = device.get_property_keys ();
 
57
+  for (var n = 0; n < keys.length; n++) {
 
58
+    print ("    " + keys[n] + "=" + device.get_property (keys[n]));
 
59
+  }
 
60
+}
 
61
+
 
62
+function on_uevent (client, action, device) {
 
63
+  print ("action " + action + " on device " + device.get_sysfs_path());
 
64
+  print_device (device);
 
65
+  print ("");
 
66
+}
 
67
+
 
68
+var client = new GUdev.Client ({subsystems: ["block", "usb/usb_interface"]});
 
69
+client.connect ("uevent", on_uevent);
 
70
+
 
71
+var block_devices = client.query_by_subsystem ("block");
 
72
+for (var n = 0; n < block_devices.length; n++) {
 
73
+  print ("block device: " + block_devices[n].get_device_file ());
 
74
+}
 
75
+
 
76
+var d;
 
77
+
 
78
+d = client.query_by_device_number (GUdev.DeviceType.BLOCK, 0x0810);
 
79
+if (d == null) {
 
80
+  print ("query_by_device_number 0x810 -> null");
 
81
+} else {
 
82
+  print ("query_by_device_number 0x810 -> " + d.get_device_file ());
 
83
+  var dd = d.get_parent_with_subsystem ("usb", null);
 
84
+  print_device (dd);
 
85
+  print ("--------------------------------------------------------------------------");
 
86
+  while (d != null) {
 
87
+    print_device (d);
 
88
+    print ("");
 
89
+    d = d.get_parent ();
 
90
+  }
 
91
+}
 
92
+
 
93
+d = client.query_by_sysfs_path ("/sys/block/sda/sda1");
 
94
+print ("query_by_sysfs_path (\"/sys/block/sda1\") -> " + d.get_device_file ());
 
95
+
 
96
+d = client.query_by_subsystem_and_name ("block", "sda2");
 
97
+print ("query_by_subsystem_and_name (\"block\", \"sda2\") -> " + d.get_device_file ());
 
98
+
 
99
+d = client.query_by_device_file ("/dev/sda");
 
100
+print ("query_by_device_file (\"/dev/sda\") -> " + d.get_device_file ());
 
101
+
 
102
+d = client.query_by_device_file ("/dev/block/8:0");
 
103
+print ("query_by_device_file (\"/dev/block/8:0\") -> " + d.get_device_file ());
 
104
+
 
105
+Mainloop.run('udev-example');
 
106
--- /dev/null
 
107
+++ udev-172/extras/gudev/seed-example-enum.js
 
108
@@ -0,0 +1,38 @@
 
109
+#!/usr/bin/env seed
 
110
+
 
111
+const GLib = imports.gi.GLib;
 
112
+const GUdev = imports.gi.GUdev;
 
113
+
 
114
+function print_device(device) {
 
115
+  print("  initialized:            " + device.get_is_initialized());
 
116
+  print("  usec since initialized: " + device.get_usec_since_initialized());
 
117
+  print("  subsystem:              " + device.get_subsystem());
 
118
+  print("  devtype:                " + device.get_devtype());
 
119
+  print("  name:                   " + device.get_name());
 
120
+  print("  number:                 " + device.get_number());
 
121
+  print("  sysfs_path:             " + device.get_sysfs_path());
 
122
+  print("  driver:                 " + device.get_driver());
 
123
+  print("  action:                 " + device.get_action());
 
124
+  print("  seqnum:                 " + device.get_seqnum());
 
125
+  print("  device type:            " + device.get_device_type());
 
126
+  print("  device number:          " + device.get_device_number());
 
127
+  print("  device file:            " + device.get_device_file());
 
128
+  print("  device file symlinks:   " + device.get_device_file_symlinks());
 
129
+  print("  tags:                   " + device.get_tags());
 
130
+  var keys = device.get_property_keys();
 
131
+  for (var n = 0; n < keys.length; n++) {
 
132
+    print("    " + keys[n] + "=" + device.get_property(keys[n]));
 
133
+  }
 
134
+}
 
135
+
 
136
+var client = new GUdev.Client({subsystems: []});
 
137
+var enumerator = new GUdev.Enumerator({client: client});
 
138
+enumerator.add_match_subsystem('b*')
 
139
+
 
140
+var devices = enumerator.execute();
 
141
+
 
142
+for (var n=0; n < devices.length; n++) {
 
143
+    var device = devices[n];
 
144
+    print_device(device);
 
145
+    print("");
 
146
+}
 
147
--- /dev/null
 
148
+++ udev-172/extras/gudev/seed-example.js
 
149
@@ -0,0 +1,72 @@
 
150
+#!/usr/bin/env seed
 
151
+
 
152
+// seed example
 
153
+
 
154
+const GLib = imports.gi.GLib;
 
155
+const GUdev = imports.gi.GUdev;
 
156
+
 
157
+function print_device (device) {
 
158
+  print ("  subsystem:             " + device.get_subsystem ());
 
159
+  print ("  devtype:               " + device.get_devtype ());
 
160
+  print ("  name:                  " + device.get_name ());
 
161
+  print ("  number:                " + device.get_number ());
 
162
+  print ("  sysfs_path:            " + device.get_sysfs_path ());
 
163
+  print ("  driver:                " + device.get_driver ());
 
164
+  print ("  action:                " + device.get_action ());
 
165
+  print ("  seqnum:                " + device.get_seqnum ());
 
166
+  print ("  device type:           " + device.get_device_type ());
 
167
+  print ("  device number:         " + device.get_device_number ());
 
168
+  print ("  device file:           " + device.get_device_file ());
 
169
+  print ("  device file symlinks:  " + device.get_device_file_symlinks ());
 
170
+  print ("  foo: " + device.get_sysfs_attr_as_strv ("stat"));
 
171
+  var keys = device.get_property_keys ();
 
172
+  for (var n = 0; n < keys.length; n++) {
 
173
+    print ("    " + keys[n] + "=" + device.get_property (keys[n]));
 
174
+  }
 
175
+}
 
176
+
 
177
+function on_uevent (client, action, device) {
 
178
+  print ("action " + action + " on device " + device.get_sysfs_path());
 
179
+  print_device (device);
 
180
+  print ("");
 
181
+}
 
182
+
 
183
+var client = new GUdev.Client ({subsystems: ["block", "usb/usb_interface"]});
 
184
+client.signal.connect ("uevent", on_uevent);
 
185
+
 
186
+var block_devices = client.query_by_subsystem ("block");
 
187
+for (var n = 0; n < block_devices.length; n++) {
 
188
+  print ("block device: " + block_devices[n].get_device_file ());
 
189
+}
 
190
+
 
191
+var d;
 
192
+
 
193
+d = client.query_by_device_number (GUdev.DeviceType.BLOCK, 0x0810);
 
194
+if (d == null) {
 
195
+  print ("query_by_device_number 0x810 -> null");
 
196
+} else {
 
197
+  print ("query_by_device_number 0x810 -> " + d.get_device_file ());
 
198
+  dd = d.get_parent_with_subsystem ("usb", null);
 
199
+  print_device (dd);
 
200
+  print ("--------------------------------------------------------------------------");
 
201
+  while (d != null) {
 
202
+    print_device (d);
 
203
+    print ("");
 
204
+    d = d.get_parent ();
 
205
+  }
 
206
+}
 
207
+
 
208
+d = client.query_by_sysfs_path ("/sys/block/sda/sda1");
 
209
+print ("query_by_sysfs_path (\"/sys/block/sda1\") -> " + d.get_device_file ());
 
210
+
 
211
+d = client.query_by_subsystem_and_name ("block", "sda2");
 
212
+print ("query_by_subsystem_and_name (\"block\", \"sda2\") -> " + d.get_device_file ());
 
213
+
 
214
+d = client.query_by_device_file ("/dev/sda");
 
215
+print ("query_by_device_file (\"/dev/sda\") -> " + d.get_device_file ());
 
216
+
 
217
+d = client.query_by_device_file ("/dev/block/8:0");
 
218
+print ("query_by_device_file (\"/dev/block/8:0\") -> " + d.get_device_file ());
 
219
+
 
220
+var mainloop = GLib.main_loop_new ();
 
221
+GLib.main_loop_run (mainloop);
 
222
--- /dev/null
 
223
+++ udev-172/extras/scsi_id/scsi_id.config
 
224
@@ -0,0 +1,17 @@
 
225
+#
 
226
+# scsi_id configuration
 
227
+#
 
228
+# lower or upper case has no effect on the left side. Quotes (") are
 
229
+# required for spaces in values. Model is the same as the SCSI
 
230
+# INQUIRY product identification field. Per the SCSI INQUIRY, the vendor
 
231
+# is limited to 8 bytes, model to 16 bytes.
 
232
+#
 
233
+# The first matching line found is used. Short matches match longer ones,
 
234
+# if you do not want such a match space fill the extra bytes. If no model
 
235
+# is specified, only the vendor string need match.
 
236
+#
 
237
+# options=<any scsi_id command line options>
 
238
+# vendor=string[,model=string],options=<per-device scsi_id options>
 
239
+
 
240
+# some libata drives require vpd page 0x80
 
241
+vendor="ATA",options=-p 0x80
 
242
--- /dev/null
 
243
+++ udev-172/extras/scsi_id/README
 
244
@@ -0,0 +1,4 @@
 
245
+scsi_id - generate a SCSI unique identifier for a given SCSI device
 
246
+
 
247
+Please send questions, comments or patches to <patmans@us.ibm.com> or
 
248
+<linux-hotplug-devel@lists.sourceforge.net>.