Commit 0e6ebf8
device_cgroup: Refactor devcgroup_seq_show to use seq_put* helpers
Replace set_access(), set_majmin(), and type_to_char() with new helpers
seq_putaccess(), seq_puttype(), and seq_putversion() that write directly
to 'seq_file'.
Simplify devcgroup_seq_show() by hard-coding "a *:* rwm", and use the
new seq_put* helper functions to list the exceptions otherwise.
This allows us to remove the intermediate string buffers while
maintaining the same functionality, including wildcard handling.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>1 parent dfa024b commit 0e6ebf8
1 file changed
+25
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 247 | + | |
251 | 248 | | |
252 | | - | |
253 | | - | |
254 | 249 | | |
255 | | - | |
| 250 | + | |
256 | 251 | | |
257 | | - | |
| 252 | + | |
258 | 253 | | |
259 | | - | |
| 254 | + | |
260 | 255 | | |
261 | 256 | | |
262 | | - | |
| 257 | + | |
263 | 258 | | |
264 | 259 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
271 | 267 | | |
272 | 268 | | |
273 | | - | |
| 269 | + | |
274 | 270 | | |
275 | | - | |
276 | | - | |
| 271 | + | |
| 272 | + | |
277 | 273 | | |
278 | | - | |
| 274 | + | |
279 | 275 | | |
280 | 276 | | |
281 | 277 | | |
282 | 278 | | |
283 | 279 | | |
284 | 280 | | |
285 | | - | |
286 | 281 | | |
287 | 282 | | |
288 | 283 | | |
| |||
292 | 287 | | |
293 | 288 | | |
294 | 289 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
| 290 | + | |
300 | 291 | | |
301 | 292 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
307 | 301 | | |
308 | 302 | | |
309 | 303 | | |
| |||
0 commit comments