/usr/share/gtk-doc/html/libudev/libudev-udev-device.html is in libudev-dev 204-5ubuntu20.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>libudev Reference Manual: udev_device</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libudev Reference Manual">
<link rel="up" href="ch01.html" title="API Reference">
<link rel="prev" href="libudev-udev-list.html" title="udev_list">
<link rel="next" href="libudev-udev-monitor.html" title="udev_monitor">
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libudev-udev-device.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#libudev-udev-device.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libudev-udev-list.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libudev-udev-monitor.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libudev-udev-device"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libudev-udev-device.top_of_page"></a>udev_device</span></h2>
<p>udev_device — kernel sys devices</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libudev-udev-device.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-ref" title="udev_device_ref ()">udev_device_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-unref" title="udev_device_unref ()">udev_device_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev.html#udev" title="struct udev"><span class="returnvalue">udev</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-udev" title="udev_device_get_udev ()">udev_device_get_udev</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-new-from-syspath" title="udev_device_new_from_syspath ()">udev_device_new_from_syspath</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-new-from-devnum" title="udev_device_new_from_devnum ()">udev_device_new_from_devnum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-new-from-subsystem-sysname" title="udev_device_new_from_subsystem_sysname ()">udev_device_new_from_subsystem_sysname</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-new-from-device-id" title="udev_device_new_from_device_id ()">udev_device_new_from_device_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-new-from-environment" title="udev_device_new_from_environment ()">udev_device_new_from_environment</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-parent" title="udev_device_get_parent ()">udev_device_get_parent</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-parent-with-subsystem-devtype" title="udev_device_get_parent_with_subsystem_devtype ()">udev_device_get_parent_with_subsystem_devtype</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-devpath" title="udev_device_get_devpath ()">udev_device_get_devpath</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-subsystem" title="udev_device_get_subsystem ()">udev_device_get_subsystem</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-devtype" title="udev_device_get_devtype ()">udev_device_get_devtype</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-syspath" title="udev_device_get_syspath ()">udev_device_get_syspath</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-sysname" title="udev_device_get_sysname ()">udev_device_get_sysname</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-sysnum" title="udev_device_get_sysnum ()">udev_device_get_sysnum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-devnode" title="udev_device_get_devnode ()">udev_device_get_devnode</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-is-initialized" title="udev_device_get_is_initialized ()">udev_device_get_is_initialized</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-devlinks-list-entry" title="udev_device_get_devlinks_list_entry ()">udev_device_get_devlinks_list_entry</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-properties-list-entry" title="udev_device_get_properties_list_entry ()">udev_device_get_properties_list_entry</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-tags-list-entry" title="udev_device_get_tags_list_entry ()">udev_device_get_tags_list_entry</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-property-value" title="udev_device_get_property_value ()">udev_device_get_property_value</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-driver" title="udev_device_get_driver ()">udev_device_get_driver</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">dev_t</span>
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-devnum" title="udev_device_get_devnum ()">udev_device_get_devnum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-action" title="udev_device_get_action ()">udev_device_get_action</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-sysattr-value" title="udev_device_get_sysattr_value ()">udev_device_get_sysattr_value</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-set-sysattr-value" title="udev_device_set_sysattr_value ()">udev_device_set_sysattr_value</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> *
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-sysattr-list-entry" title="udev_device_get_sysattr_list_entry ()">udev_device_get_sysattr_list_entry</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">unsigned long long <span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-seqnum" title="udev_device_get_seqnum ()">udev_device_get_seqnum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">unsigned long long <span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-get-usec-since-initialized" title="udev_device_get_usec_since_initialized ()">udev_device_get_usec_since_initialized</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libudev-udev-device.html#udev-device-has-tag" title="udev_device_has_tag ()">udev_device_has_tag</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libudev-udev-device.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device">udev_device</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libudev-udev-device.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">
</pre>
</div>
<div class="refsect1">
<a name="libudev-udev-device.description"></a><h2>Description</h2>
<p>Representation of kernel sys devices. Devices are uniquely identified
by their syspath, every device has exactly one path in the kernel sys
filesystem. Devices usually belong to a kernel subsystem, and and have
a unique name inside that subsystem.</p>
</div>
<div class="refsect1">
<a name="libudev-udev-device.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="udev-device-ref"></a><h3>udev_device_ref ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
udev_device_ref (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Take a reference of a udev device.</p>
<div class="refsect3">
<a name="id-1.2.4.7.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.2.6"></a><h4>Returns</h4>
<p> the passed udev device</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-unref"></a><h3>udev_device_unref ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
udev_device_unref (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Drop a reference of a udev device. If the refcount reaches zero,
the resources of the device will be released.</p>
<div class="refsect3">
<a name="id-1.2.4.7.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.3.6"></a><h4>Returns</h4>
<p> the passed udev device if it has still an active reference, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> otherwise.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-udev"></a><h3>udev_device_get_udev ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev.html#udev" title="struct udev"><span class="returnvalue">udev</span></a> *
udev_device_get_udev (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the udev library context the device was created with.</p>
<div class="refsect3">
<a name="id-1.2.4.7.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.4.6"></a><h4>Returns</h4>
<p> the udev library context</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-new-from-syspath"></a><h3>udev_device_new_from_syspath ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
udev_device_new_from_syspath (<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *syspath</code></em>);</pre>
<p>Create new udev device, and fill in information from the sys
device and the udev database entry. The syspath is the absolute
path to the device, including the sys mount point.</p>
<p>The initial refcount is 1, and needs to be decremented to
release the resources of the udev device.</p>
<div class="refsect3">
<a name="id-1.2.4.7.5.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>udev</p></td>
<td class="parameter_description"><p>udev library context</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>syspath</p></td>
<td class="parameter_description"><p>sys device path including sys directory</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.5.7"></a><h4>Returns</h4>
<p> a new udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a>, if it does not exist</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-new-from-devnum"></a><h3>udev_device_new_from_devnum ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
udev_device_new_from_devnum (<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>,
<em class="parameter"><code><span class="type">char</span> type</code></em>,
<em class="parameter"><code><span class="type">dev_t</span> devnum</code></em>);</pre>
<p>Create new udev device, and fill in information from the sys
device and the udev database entry. The device is looked-up
by its major/minor number and type. Character and block device
numbers are not unique across the two types.</p>
<p>The initial refcount is 1, and needs to be decremented to
release the resources of the udev device.</p>
<div class="refsect3">
<a name="id-1.2.4.7.6.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>udev</p></td>
<td class="parameter_description"><p>udev library context</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>char or block device</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>devnum</p></td>
<td class="parameter_description"><p>device major/minor number</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.6.7"></a><h4>Returns</h4>
<p> a new udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a>, if it does not exist</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-new-from-subsystem-sysname"></a><h3>udev_device_new_from_subsystem_sysname ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
udev_device_new_from_subsystem_sysname
(<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *subsystem</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *sysname</code></em>);</pre>
<p>Create new udev device, and fill in information from the sys device
and the udev database entry. The device is looked up by the subsystem
and name string of the device, like "mem" / "zero", or "block" / "sda".</p>
<p>The initial refcount is 1, and needs to be decremented to
release the resources of the udev device.</p>
<div class="refsect3">
<a name="id-1.2.4.7.7.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>udev</p></td>
<td class="parameter_description"><p>udev library context</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>subsystem</p></td>
<td class="parameter_description"><p>the subsystem of the device</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sysname</p></td>
<td class="parameter_description"><p>the name of the device</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.7.7"></a><h4>Returns</h4>
<p> a new udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a>, if it does not exist</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-new-from-device-id"></a><h3>udev_device_new_from_device_id ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
udev_device_new_from_device_id (<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>,
<em class="parameter"><code><span class="type">char</span> *id</code></em>);</pre>
<p>Create new udev device, and fill in information from the sys
device and the udev database entry. The device is looked-up
by a special string:
b8:2 - block device major:minor
c128:1 - char device major:minor
n3 - network device ifindex
+sound:card29 - kernel driver core subsystem:device name</p>
<p>The initial refcount is 1, and needs to be decremented to
release the resources of the udev device.</p>
<div class="refsect3">
<a name="id-1.2.4.7.8.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>udev</p></td>
<td class="parameter_description"><p>udev library context</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>id</p></td>
<td class="parameter_description"><p>text string identifying a kernel device</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.8.7"></a><h4>Returns</h4>
<p> a new udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a>, if it does not exist</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-new-from-environment"></a><h3>udev_device_new_from_environment ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
udev_device_new_from_environment (<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>);</pre>
<p>Create new udev device, and fill in information from the
current process environment. This only works reliable if
the process is called from a udev rule. It is usually used
for tools executed from IMPORT= rules.</p>
<p>The initial refcount is 1, and needs to be decremented to
release the resources of the udev device.</p>
<div class="refsect3">
<a name="id-1.2.4.7.9.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev</p></td>
<td class="parameter_description"><p>udev library context</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.9.7"></a><h4>Returns</h4>
<p> a new udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a>, if it does not exist</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-parent"></a><h3>udev_device_get_parent ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
udev_device_get_parent (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Find the next parent device, and fill in information from the sys
device and the udev database entry.</p>
<p>The returned the device is not referenced. It is attached to the
child device, and will be cleaned up when the child device
is cleaned up.</p>
<p>It is not necessarily just the upper level directory, empty or not
recognized sys directories are ignored.</p>
<p>It can be called as many times as needed, without caring about
references.</p>
<div class="refsect3">
<a name="id-1.2.4.7.10.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>the device to start searching from</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.10.9"></a><h4>Returns</h4>
<p> a new udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a>, if it no parent exist.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-parent-with-subsystem-devtype"></a><h3>udev_device_get_parent_with_subsystem_devtype ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> *
udev_device_get_parent_with_subsystem_devtype
(<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *subsystem</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *devtype</code></em>);</pre>
<p>Find the next parent device, with a matching subsystem and devtype
value, and fill in information from the sys device and the udev
database entry.</p>
<p>If devtype is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a>, only subsystem is checked, and any devtype will
match.</p>
<p>The returned the device is not referenced. It is attached to the
child device, and will be cleaned up when the child device
is cleaned up.</p>
<p>It can be called as many times as needed, without caring about
references.</p>
<div class="refsect3">
<a name="id-1.2.4.7.11.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device to start searching from</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>subsystem</p></td>
<td class="parameter_description"><p>the subsystem of the device</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>devtype</p></td>
<td class="parameter_description"><p>the type (DEVTYPE) of the device</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.11.9"></a><h4>Returns</h4>
<p> a new udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if no matching parent exists.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-devpath"></a><h3>udev_device_get_devpath ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_devpath (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the kernel devpath value of the udev device. The path
does not contain the sys mount point, and starts with a '/'.</p>
<div class="refsect3">
<a name="id-1.2.4.7.12.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.12.6"></a><h4>Returns</h4>
<p> the devpath of the udev device</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-subsystem"></a><h3>udev_device_get_subsystem ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_subsystem (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the subsystem string of the udev device. The string does not
contain any "/".</p>
<div class="refsect3">
<a name="id-1.2.4.7.13.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.13.6"></a><h4>Returns</h4>
<p> the subsystem name of the udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if it can not be determined</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-devtype"></a><h3>udev_device_get_devtype ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_devtype (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the devtype string of the udev device.</p>
<div class="refsect3">
<a name="id-1.2.4.7.14.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.14.6"></a><h4>Returns</h4>
<p> the devtype name of the udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if it can not be determined</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-syspath"></a><h3>udev_device_get_syspath ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_syspath (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the sys path of the udev device. The path is an
absolute path and starts with the sys mount point.</p>
<div class="refsect3">
<a name="id-1.2.4.7.15.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.15.6"></a><h4>Returns</h4>
<p> the sys path of the udev device</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-sysname"></a><h3>udev_device_get_sysname ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_sysname (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Get the kernel device name in /sys.</p>
<div class="refsect3">
<a name="id-1.2.4.7.16.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.16.6"></a><h4>Returns</h4>
<p> the name string of the device device</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-sysnum"></a><h3>udev_device_get_sysnum ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_sysnum (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Get the instance number of the device.</p>
<div class="refsect3">
<a name="id-1.2.4.7.17.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.17.6"></a><h4>Returns</h4>
<p> the trailing number string of the device name</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-devnode"></a><h3>udev_device_get_devnode ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_devnode (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the device node file name belonging to the udev device.
The path is an absolute path, and starts with the device directory.</p>
<div class="refsect3">
<a name="id-1.2.4.7.18.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.18.6"></a><h4>Returns</h4>
<p> the device node file name of the udev device, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if no device node exists</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-is-initialized"></a><h3>udev_device_get_is_initialized ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
udev_device_get_is_initialized (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Check if udev has already handled the device and has set up
device node permissions and context, or has renamed a network
device.</p>
<p>This is only implemented for devices with a device node
or network interfaces. All other devices return 1 here.</p>
<div class="refsect3">
<a name="id-1.2.4.7.19.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.19.7"></a><h4>Returns</h4>
<p> 1 if the device is set up. 0 otherwise.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-devlinks-list-entry"></a><h3>udev_device_get_devlinks_list_entry ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> *
udev_device_get_devlinks_list_entry (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the list of device links pointing to the device file of
the udev device. The next list entry can be retrieved with
<a class="link" href="libudev-udev-list.html#udev-list-entry-get-next" title="udev_list_entry_get_next ()"><code class="function">udev_list_entry_get_next()</code></a>, which returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if no more entries exist.
The devlink path can be retrieved from the list entry by
<a class="link" href="libudev-udev-list.html#udev-list-entry-get-name" title="udev_list_entry_get_name ()"><code class="function">udev_list_entry_get_name()</code></a>. The path is an absolute path, and starts with
the device directory.</p>
<div class="refsect3">
<a name="id-1.2.4.7.20.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.20.6"></a><h4>Returns</h4>
<p> the first entry of the device node link list</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-properties-list-entry"></a><h3>udev_device_get_properties_list_entry ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> *
udev_device_get_properties_list_entry (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the list of key/value device properties of the udev
device. The next list entry can be retrieved with <a class="link" href="libudev-udev-list.html#udev-list-entry-get-next" title="udev_list_entry_get_next ()"><code class="function">udev_list_entry_get_next()</code></a>,
which returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if no more entries exist. The property name
can be retrieved from the list entry by <a class="link" href="libudev-udev-list.html#udev-list-entry-get-name" title="udev_list_entry_get_name ()"><code class="function">udev_list_entry_get_name()</code></a>,
the property value by <a class="link" href="libudev-udev-list.html#udev-list-entry-get-value" title="udev_list_entry_get_value ()"><code class="function">udev_list_entry_get_value()</code></a>.</p>
<div class="refsect3">
<a name="id-1.2.4.7.21.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.21.6"></a><h4>Returns</h4>
<p> the first entry of the property list</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-tags-list-entry"></a><h3>udev_device_get_tags_list_entry ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> *
udev_device_get_tags_list_entry (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the list of tags attached to the udev device. The next
list entry can be retrieved with <a class="link" href="libudev-udev-list.html#udev-list-entry-get-next" title="udev_list_entry_get_next ()"><code class="function">udev_list_entry_get_next()</code></a>,
which returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if no more entries exist. The tag string
can be retrieved from the list entry by <a class="link" href="libudev-udev-list.html#udev-list-entry-get-name" title="udev_list_entry_get_name ()"><code class="function">udev_list_entry_get_name()</code></a>.</p>
<div class="refsect3">
<a name="id-1.2.4.7.22.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.22.6"></a><h4>Returns</h4>
<p> the first entry of the tag list</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-property-value"></a><h3>udev_device_get_property_value ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_property_value (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
<p>Get the value of a given property.</p>
<div class="refsect3">
<a name="id-1.2.4.7.23.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>property name</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.23.6"></a><h4>Returns</h4>
<p> the property string, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if there is no such property.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-driver"></a><h3>udev_device_get_driver ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_driver (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Get the kernel driver name.</p>
<div class="refsect3">
<a name="id-1.2.4.7.24.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.24.6"></a><h4>Returns</h4>
<p> the driver name string, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if there is no driver attached.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-devnum"></a><h3>udev_device_get_devnum ()</h3>
<pre class="programlisting"><span class="returnvalue">dev_t</span>
udev_device_get_devnum (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Get the device major/minor number.</p>
<div class="refsect3">
<a name="id-1.2.4.7.25.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.25.6"></a><h4>Returns</h4>
<p> the dev_t number.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-action"></a><h3>udev_device_get_action ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_action (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>This is only valid if the device was received through a monitor. Devices read from
sys do not have an action string. Usual actions are: add, remove, change, online,
offline.</p>
<div class="refsect3">
<a name="id-1.2.4.7.26.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.26.6"></a><h4>Returns</h4>
<p> the kernel action value, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if there is no action value available.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-sysattr-value"></a><h3>udev_device_get_sysattr_value ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
udev_device_get_sysattr_value (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *sysattr</code></em>);</pre>
<p>The retrieved value is cached in the device. Repeated calls will return the same
value and not open the attribute again.</p>
<div class="refsect3">
<a name="id-1.2.4.7.27.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sysattr</p></td>
<td class="parameter_description"><p>attribute name</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.27.6"></a><h4>Returns</h4>
<p> the content of a sys attribute file, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> if there is no sys attribute value.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-set-sysattr-value"></a><h3>udev_device_set_sysattr_value ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
udev_device_set_sysattr_value (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *sysattr</code></em>,
<em class="parameter"><code><span class="type">char</span> *value</code></em>);</pre>
<p>Update the contents of the sys attribute and the cached value of the device.</p>
<div class="refsect3">
<a name="id-1.2.4.7.28.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sysattr</p></td>
<td class="parameter_description"><p>attribute name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>new value to be set</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.28.6"></a><h4>Returns</h4>
<p> Negative error code on failure or 0 on success.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-sysattr-list-entry"></a><h3>udev_device_get_sysattr_list_entry ()</h3>
<pre class="programlisting">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> *
udev_device_get_sysattr_list_entry (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Retrieve the list of available sysattrs, with value being empty;
This just return all available sysfs attributes for a particular
device without reading their values.</p>
<div class="refsect3">
<a name="id-1.2.4.7.29.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.29.6"></a><h4>Returns</h4>
<p> the first entry of the property list</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-seqnum"></a><h3>udev_device_get_seqnum ()</h3>
<pre class="programlisting">unsigned long long <span class="returnvalue">int</span>
udev_device_get_seqnum (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>This is only valid if the device was received through a monitor. Devices read from
sys do not have a sequence number.</p>
<div class="refsect3">
<a name="id-1.2.4.7.30.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.30.6"></a><h4>Returns</h4>
<p> the kernel event sequence number, or 0 if there is no sequence number available.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-get-usec-since-initialized"></a><h3>udev_device_get_usec_since_initialized ()</h3>
<pre class="programlisting">unsigned long long <span class="returnvalue">int</span>
udev_device_get_usec_since_initialized
(<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre>
<p>Return the number of microseconds passed since udev set up the
device for the first time.</p>
<p>This is only implemented for devices with need to store properties
in the udev database. All other devices return 0 here.</p>
<div class="refsect3">
<a name="id-1.2.4.7.31.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.31.7"></a><h4>Returns</h4>
<p> the number of microseconds since the device was first seen.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udev-device-has-tag"></a><h3>udev_device_has_tag ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
udev_device_has_tag (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *tag</code></em>);</pre>
<p>Check if a given device has a certain tag associated.</p>
<div class="refsect3">
<a name="id-1.2.4.7.32.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>udev_device</p></td>
<td class="parameter_description"><p>udev device</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tag</p></td>
<td class="parameter_description"><p>tag name</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.4.7.32.6"></a><h4>Returns</h4>
<p> 1 if the tag is found. 0 otherwise.</p>
<p></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libudev-udev-device.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="udev-device"></a><h3>struct udev_device</h3>
<pre class="programlisting">struct udev_device;</pre>
<p>Opaque object representing one kernel sys device.</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.20</div>
</body>
</html>
|